\section{KArchive\-File Class Reference}
\label{classKArchiveFile}\index{KArchiveFile@{KArchiveFile}}
A file in an archive.  


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

Inheritance diagram for KArchive\-File:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=62pt]{classKArchiveFile__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KArchive\-File:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=117pt]{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)\label{classKArchiveFile_a0}

\item 
int {\bf position} () const 
\begin{CompactList}\small\item\em Position of the data in the [uncompressed] archive. \item\end{CompactList}\item 
int {\bf size} () const 
\begin{CompactList}\small\item\em Size of the data. \item\end{CompactList}\item 
void {\bf set\-Size} (int s)
\begin{CompactList}\small\item\em Set size of data, usually after writing the file. \item\end{CompactList}\item 
virtual {\bf QByte\-Array} {\bf data} () const 
\item 
{\bf QIODevice} $\ast$ {\bf device} () const 
\begin{CompactList}\small\item\em This method returns {\bf QIODevice} (internal class: {\bf KLimited\-IODevice}{\rm (p.\,\pageref{classKLimitedIODevice})}) on top of the underlying {\bf QIODevice}. \item\end{CompactList}\item 
virtual bool {\bf is\-File} () const 
\item 
void {\bf copy\-To} (const  {\bf QString} \&dest) const 
\begin{CompactList}\small\item\em Extracts the file to the directory {\tt dest} \begin{Desc}
\item[Since:]3.1. \end{Desc}
\item\end{CompactList}\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}
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 243 of file karchive.h.

\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. 



Definition at line 262 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. 



Definition at line 267 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. 



Definition at line 263 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}


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


Definition at line 272 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. 

Definition at line 289 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}


\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 283 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[Since:]3.1. \end{Desc}




Definition at line 294 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}
