\section{KArchive\-Directory Class Reference}
\label{classKArchiveDirectory}\index{KArchiveDirectory@{KArchiveDirectory}}
Represents a directory entry in a {\bf KArchive}{\rm (p.\,\pageref{classKArchive})}. A directory in an archive.  


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

Inheritance diagram for KArchive\-Directory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=66pt]{classKArchiveDirectory__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KArchive\-Directory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=165pt]{classKArchiveDirectory__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KArchive\-Directory} ({\bf KArchive} $\ast$archive, const {\bf QString} \&name, int access, int date, const {\bf QString} \&user, const {\bf QString} \&group, const {\bf QString} \&symlink)
\item 
{\bf QString\-List} {\bf entries} () const 
\item 
{\bf KArchive\-Entry} $\ast$ {\bf entry} ({\bf QString} name)
\item 
const {\bf KArchive\-Entry} $\ast$ {\bf entry} ({\bf QString} name) const 
\item 
void {\bf add\-Entry} ({\bf KArchive\-Entry} $\ast$)\label{classKArchiveDirectory_a5}

\item 
virtual bool {\bf is\-Directory} () const 
\item 
void {\bf copy\-To} (const {\bf QString} \&dest, bool recursive=true) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKArchiveDirectory_b0}

\end{CompactItemize}


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

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

{\bf KArchive\-File}{\rm (p.\,\pageref{classKArchiveFile})} \end{Desc}




Definition at line 562 of file karchive.h.

\subsection{Constructor \& Destructor Documentation}
\index{KArchiveDirectory@{KArchive\-Directory}!KArchiveDirectory@{KArchiveDirectory}}
\index{KArchiveDirectory@{KArchiveDirectory}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KArchive\-Directory::KArchive\-Directory ({\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})}\label{classKArchiveDirectory_a0}


Creates a new directory 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 \end{description}
\end{Desc}


Definition at line 517 of file karchive.cpp.

References QDict::set\-Auto\-Delete().

\subsection{Member Function Documentation}
\index{KArchiveDirectory@{KArchive\-Directory}!entries@{entries}}
\index{entries@{entries}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KArchive\-Directory::entries () const}\label{classKArchiveDirectory_a2}


Returns a list of sub-entries. 

\begin{Desc}
\item[Returns:]the names of all entries in this directory (filenames, no path). \end{Desc}


Definition at line 526 of file karchive.cpp.

References QDict\-Iterator::current(), and QDict\-Iterator::current\-Key().

Referenced by copy\-To().\index{KArchiveDirectory@{KArchive\-Directory}!entry@{entry}}
\index{entry@{entry}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KArchive\-Entry} $\ast$ KArchive\-Directory::entry ({\bf QString} {\em name})}\label{classKArchiveDirectory_a3}


Returns the entry with the given name. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]may be \char`\"{}test1\char`\"{}, \char`\"{}mydir/test3\char`\"{}, \char`\"{}mydir/mysubdir/test3\char`\"{}, etc. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the entry in the directory. \end{Desc}


Definition at line 537 of file karchive.cpp.

References QString::find(), KArchive\-Entry::is\-Directory(), QString::left(), QString::length(), and QString::mid().

Referenced by copy\-To(), KArchive::find\-Or\-Create(), and KZip::open\-Archive().\index{KArchiveDirectory@{KArchive\-Directory}!entry@{entry}}
\index{entry@{entry}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KArchive\-Entry} $\ast$ KArchive\-Directory::entry ({\bf QString} {\em name}) const}\label{classKArchiveDirectory_a4}


Returns the entry with the given name. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]may be \char`\"{}test1\char`\"{}, \char`\"{}mydir/test3\char`\"{}, \char`\"{}mydir/mysubdir/test3\char`\"{}, etc. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the entry in the directory. \end{Desc}


Definition at line 574 of file karchive.cpp.\index{KArchiveDirectory@{KArchive\-Directory}!isDirectory@{isDirectory}}
\index{isDirectory@{isDirectory}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KArchive\-Directory::is\-Directory () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKArchiveDirectory_a6}


Checks whether this entry is a directory. 

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


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

Definition at line 609 of file karchive.h.\index{KArchiveDirectory@{KArchive\-Directory}!copyTo@{copyTo}}
\index{copyTo@{copyTo}!KArchiveDirectory@{KArchive\-Directory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KArchive\-Directory::copy\-To (const {\bf QString} \& {\em dest}, bool {\em recursive} = {\tt true}) const}\label{classKArchiveDirectory_a7}


Extracts all entries in this archive directory to the directory {\tt dest}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest}]the directory to extract to \item[{\em recursive}]if set to true, subdirectories are extracted as well \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 585 of file karchive.cpp.

References KArchive\-File::copy\-To(), entries(), entry(), QMap::insert(), KArchive\-Entry::is\-Directory(), QPtr\-Stack::is\-Empty(), KArchive\-Entry::is\-File(), QDir::mkdir(), KArchive\-Entry::name(), QValue\-Stack::pop(), QPtr\-Stack::pop(), KArchive\-File::position(), QValue\-Stack::push(), and QPtr\-Stack::push().

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