\section{KArchive\-File Class Reference}
\label{classKArchiveFile}\index{KArchiveFile@{KArchiveFile}}
Represents a file entry in a {\bf KArchive}{\rm (p.\,\pageref{classKArchive})}. A file in an archive.  


{\tt \#include $<$karchive.h$>$}

Inheritance diagram for KArchive\-File:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classKArchiveFile__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KArchive\-File:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=99pt]{classKArchiveFile__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KArchive\-File} ({\bf KArchive} $\ast$archive, const {\bf QString} \&name, int access, int date, const {\bf QString} \&user, const {\bf QString} \&group, const {\bf QString} \&symlink, int pos, int size)
\item 
int {\bf position} () const 
\item 
int {\bf size} () const 
\item 
void {\bf set\-Size} (int s)
\item 
virtual {\bf QByte\-Array} {\bf data} () const 
\item 
{\bf QIODevice} $\ast$ {\bf device} () const 
\item 
virtual bool {\bf is\-File} () const 
\item 
void {\bf copy\-To} (const {\bf QString} \&dest) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKArchiveFile_b0}

\end{CompactItemize}


\subsection{Detailed Description}
Represents a file entry in a {\bf KArchive}{\rm (p.\,\pageref{classKArchive})}. A file in an archive. 

\begin{Desc}
\item[See also:]{\bf KArchive}{\rm (p.\,\pageref{classKArchive})} 

{\bf KArchive\-Directory}{\rm (p.\,\pageref{classKArchiveDirectory})} \end{Desc}




Definition at line 479 of file karchive.h.

\subsection{Constructor \& Destructor Documentation}
\index{KArchiveFile@{KArchive\-File}!KArchiveFile@{KArchiveFile}}
\index{KArchiveFile@{KArchiveFile}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KArchive\-File::KArchive\-File ({\bf KArchive} $\ast$ {\em archive}, const {\bf QString} \& {\em name}, int {\em access}, int {\em date}, const {\bf QString} \& {\em user}, const {\bf QString} \& {\em group}, const {\bf QString} \& {\em symlink}, int {\em pos}, int {\em size})}\label{classKArchiveFile_a0}


Creates a new file entry. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em archive}]the entries archive \item[{\em name}]the name of the entry \item[{\em access}]the permissions in unix format \item[{\em date}]the date (in seconds since 1970) \item[{\em user}]the user that owns the entry \item[{\em group}]the group that owns the entry \item[{\em symlink}]the symlink, or QString::null \item[{\em pos}]the position of the file in the directory \item[{\em size}]the size of the file \end{description}
\end{Desc}


Definition at line 462 of file karchive.cpp.

\subsection{Member Function Documentation}
\index{KArchiveFile@{KArchive\-File}!position@{position}}
\index{position@{position}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KArchive\-File::position () const}\label{classKArchiveFile_a2}


Position of the data in the [uncompressed] archive. 

\begin{Desc}
\item[Returns:]the position of the file \end{Desc}


Definition at line 472 of file karchive.cpp.

Referenced by KArchive\-Directory::copy\-To().\index{KArchiveFile@{KArchive\-File}!size@{size}}
\index{size@{size}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KArchive\-File::size () const}\label{classKArchiveFile_a3}


Size of the data. 

\begin{Desc}
\item[Returns:]the size of the file \end{Desc}


Definition at line 477 of file karchive.cpp.\index{KArchiveFile@{KArchive\-File}!setSize@{setSize}}
\index{setSize@{setSize}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KArchive\-File::set\-Size (int {\em s})\hspace{0.3cm}{\tt  [inline]}}\label{classKArchiveFile_a4}


Set size of data, usually after writing the file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]the new size of the file \end{description}
\end{Desc}


Definition at line 514 of file karchive.h.\index{KArchiveFile@{KArchive\-File}!data@{data}}
\index{data@{data}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QByte\-Array} KArchive\-File::data () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKArchiveFile_a5}


Returns the data of the file. 

Call {\bf data()}{\rm (p.\,\pageref{classKArchiveFile_a5})} with care (only once per file), this data isn't cached. \begin{Desc}
\item[Returns:]the content of this file. \end{Desc}


Definition at line 482 of file karchive.cpp.

References QIODevice::at(), KArchive::device(), and QIODevice::read\-Block().

Referenced by copy\-To().\index{KArchiveFile@{KArchive\-File}!device@{device}}
\index{device@{device}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QIODevice} $\ast$ KArchive\-File::device () const}\label{classKArchiveFile_a6}


This method returns {\bf QIODevice} (internal class: {\bf KLimited\-IODevice}{\rm (p.\,\pageref{classKLimitedIODevice})}) on top of the underlying {\bf QIODevice}. 

This is obviously for reading only. Note that the ownership of the device is being transferred to the caller, who will have to delete it. The returned device auto-opens (in readonly mode), no need to open it. \begin{Desc}
\item[Returns:]the {\bf QIODevice} of the file \end{Desc}


Definition at line 499 of file karchive.cpp.\index{KArchiveFile@{KArchive\-File}!isFile@{isFile}}
\index{isFile@{isFile}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KArchive\-File::is\-File () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKArchiveFile_a7}


Checks whether this entry is a file. 

\begin{Desc}
\item[Returns:]true, since this entry is a file \end{Desc}


Reimplemented from {\bf KArchive\-Entry} {\rm (p.\,\pageref{classKArchiveEntry_a9})}.

Definition at line 537 of file karchive.h.\index{KArchiveFile@{KArchive\-File}!copyTo@{copyTo}}
\index{copyTo@{copyTo}!KArchiveFile@{KArchive\-File}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KArchive\-File::copy\-To (const {\bf QString} \& {\em dest}) const}\label{classKArchiveFile_a8}


Extracts the file to the directory {\tt dest}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest}]the directory to extract to \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 504 of file karchive.cpp.

References QFile::close(), data(), KArchive\-Entry::name(), and QFile::open().

Referenced by KArchive\-Directory::copy\-To().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
karchive.h\item 
karchive.cpp\end{CompactItemize}
