\section{JlCompress Class Reference}
\label{classJlCompress}\index{JlCompress@{JlCompress}}


Utility class for typical operations.  




{\ttfamily \#include $<$JlCompress.h$>$}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static bool {\bf compressFile} ({\bf QString} fileCompressed, {\bf QString} file)
\begin{DoxyCompactList}\small\item\em Compress a single file. \end{DoxyCompactList}\item 
static bool {\bf compressFiles} ({\bf QString} fileCompressed, {\bf QStringList} files)
\begin{DoxyCompactList}\small\item\em Compress a list of files. \end{DoxyCompactList}\item 
static bool {\bf compressDir} ({\bf QString} fileCompressed, {\bf QString} dir={\bf QString}(), bool recursive=true)
\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item 
static bool {\bf compressDir} ({\bf QString} fileCompressed, {\bf QString} dir, bool recursive, {\bf QDir::Filters} filters)
\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item 
static {\bf QString} {\bf extractFile} ({\bf QString} fileCompressed, {\bf QString} fileName, {\bf QString} fileDest={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf extractFiles} ({\bf QString} fileCompressed, {\bf QStringList} files, {\bf QString} dir={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf extractDir} ({\bf QString} fileCompressed, {\bf QString} dir={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf getFileList} ({\bf QString} fileCompressed)
\begin{DoxyCompactList}\small\item\em Get the file list. \end{DoxyCompactList}\item 
static {\bf QString} {\bf extractFile} ({\bf QIODevice} $\ast$ioDevice, {\bf QString} fileName, {\bf QString} fileDest={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf extractFiles} ({\bf QIODevice} $\ast$ioDevice, {\bf QStringList} files, {\bf QString} dir={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf extractDir} ({\bf QIODevice} $\ast$ioDevice, {\bf QString} dir={\bf QString}())
\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item 
static {\bf QStringList} {\bf getFileList} ({\bf QIODevice} $\ast$ioDevice)
\begin{DoxyCompactList}\small\item\em Get the file list. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Utility class for typical operations. 

This class contains a number of useful static functions to perform simple operations, such as mass ZIP packing or extraction. 

\subsection{Member Function Documentation}
\index{JlCompress@{JlCompress}!compressFile@{compressFile}}
\index{compressFile@{compressFile}!JlCompress@{JlCompress}}
\subsubsection[{compressFile}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressFile (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QString}}]{file}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a4a4de9c62ecf161bb658d4d80495ea97}


Compress a single file. 


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em file} & The file to compress. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if success, false otherwise. 
\end{DoxyReturn}


References QuaZip::close(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), and QFile::remove().

\index{JlCompress@{JlCompress}!compressFiles@{compressFiles}}
\index{compressFiles@{compressFiles}!JlCompress@{JlCompress}}
\subsubsection[{compressFiles}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressFiles (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QStringList}}]{files}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a9cdb92d29a94c6b13a718a3249685846}


Compress a list of files. 


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em files} & The file list to compress. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if success, false otherwise. 
\end{DoxyReturn}


References QuaZip::close(), QFileInfo::exists(), QFileInfo::fileName(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), QFile::remove(), and QFileInfo::setFile().

\index{JlCompress@{JlCompress}!compressDir@{compressDir}}
\index{compressDir@{compressDir}!JlCompress@{JlCompress}}
\subsubsection[{compressDir}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressDir (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}, }
\item[{bool}]{recursive = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a8708eafcadc5c192a1d492e784cfc98f}


Compress a whole directory. 

Does not compress hidden files. See \doxyref{compressDir(QString, QString, bool, QDir::Filters)}{p.}{classJlCompress_ada7511686a24c014e9db25735be148a7}.


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em dir} & The directory to compress. \\
\hline
{\em recursive} & Whether to pack the subdirectories as well, or just regular files. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if success, false otherwise. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!compressDir@{compressDir}}
\index{compressDir@{compressDir}!JlCompress@{JlCompress}}
\subsubsection[{compressDir}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressDir (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QString}}]{dir, }
\item[{bool}]{recursive, }
\item[{{\bf QDir::Filters}}]{filters}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_ada7511686a24c014e9db25735be148a7}


Compress a whole directory. 

Unless filters are specified explicitly, packs only regular non-\/hidden files (and subdirs, if {\ttfamily recursive} is true). If filters are specified, they are OR-\/combined with {\ttfamily QDir::AllDirs$|$QDir::NoDotAndDotDot} when searching for dirs and with {\ttfamily QDir::Files} when searching for files.


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & path to the resulting archive \\
\hline
{\em dir} & path to the directory being compressed \\
\hline
{\em recursive} & if true, then the subdirectories are packed as well \\
\hline
{\em filters} & what to pack, filters are applied both when searching for subdirs (if packing recursively) and when looking for files to pack \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false otherwise 
\end{DoxyReturn}


References QuaZip::close(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), and QFile::remove().

\index{JlCompress@{JlCompress}!extractFile@{extractFile}}
\index{extractFile@{extractFile}!JlCompress@{JlCompress}}
\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} JlCompress::extractFile (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QString}}]{fileName, }
\item[{{\bf QString}}]{fileDest = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a38c0d58bfe3bbbcb3cf4e98d126633a3}


Extract a single file. 


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em fileName} & The file to extract. \\
\hline
{\em fileDest} & The destination file, assumed to be identical to {\itshape file\/} if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!extractFiles@{extractFiles}}
\index{extractFiles@{extractFiles}!JlCompress@{JlCompress}}
\subsubsection[{extractFiles}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractFiles (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QStringList}}]{files, }
\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a309e9ee366719a4d8aa28f837fab73ae}


Extract a list of files. 


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em files} & The file list to extract. \\
\hline
{\em dir} & The directory to put the files to, the current directory if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!extractDir@{extractDir}}
\index{extractDir@{extractDir}!JlCompress@{JlCompress}}
\subsubsection[{extractDir}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractDir (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed, }
\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a365a153baa4c11812d93cbca60b6a293}


Extract a whole archive. 


\begin{DoxyParams}{Parameters}
{\em fileCompressed} & The name of the archive. \\
\hline
{\em dir} & The directory to extract to, the current directory if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!getFileList@{getFileList}}
\index{getFileList@{getFileList}!JlCompress@{JlCompress}}
\subsubsection[{getFileList}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::getFileList (
\begin{DoxyParamCaption}
\item[{{\bf QString}}]{fileCompressed}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_ab42422be913f817d7e04c1b1cd5d0156}


Get the file list. 

\begin{DoxyReturn}{Returns}
The list of the files in the archive, or, more precisely, the list of the entries, including both files and directories if they are present separately. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!extractFile@{extractFile}}
\index{extractFile@{extractFile}!JlCompress@{JlCompress}}
\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} JlCompress::extractFile (
\begin{DoxyParamCaption}
\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
\item[{{\bf QString}}]{fileName, }
\item[{{\bf QString}}]{fileDest = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_ae789e7e744129a0429dc976fdcd33eac}


Extract a single file. 


\begin{DoxyParams}{Parameters}
{\em ioDevice} & pointer to device with compressed data. \\
\hline
{\em fileName} & The file to extract. \\
\hline
{\em fileDest} & The destination file, assumed to be identical to {\itshape file\/} if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!extractFiles@{extractFiles}}
\index{extractFiles@{extractFiles}!JlCompress@{JlCompress}}
\subsubsection[{extractFiles}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractFiles (
\begin{DoxyParamCaption}
\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
\item[{{\bf QStringList}}]{files, }
\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a741646b1e2a922b3c48c2627fdc35f5b}


Extract a list of files. 


\begin{DoxyParams}{Parameters}
{\em ioDevice} & pointer to device with compressed data. \\
\hline
{\em files} & The file list to extract. \\
\hline
{\em dir} & The directory to put the files to, the current directory if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!extractDir@{extractDir}}
\index{extractDir@{extractDir}!JlCompress@{JlCompress}}
\subsubsection[{extractDir}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractDir (
\begin{DoxyParamCaption}
\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_ac7877bcdf951d634cc2e1e6afe52e908}


Extract a whole archive. 


\begin{DoxyParams}{Parameters}
{\em ioDevice} & pointer to device with compressed data. \\
\hline
{\em dir} & The directory to extract to, the current directory if left empty. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of the full paths of the files extracted, empty on failure. 
\end{DoxyReturn}
\index{JlCompress@{JlCompress}!getFileList@{getFileList}}
\index{getFileList@{getFileList}!JlCompress@{JlCompress}}
\subsubsection[{getFileList}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::getFileList (
\begin{DoxyParamCaption}
\item[{{\bf QIODevice} $\ast$}]{ioDevice}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [static]}}\label{classJlCompress_a4ae5501a229d15f228cc034fc97cf78d}


Get the file list. 

\begin{DoxyReturn}{Returns}
The list of the files in the archive, or, more precisely, the list of the entries, including both files and directories if they are present separately. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
quazip/JlCompress.h\item 
quazip/JlCompress.cpp\end{DoxyCompactItemize}
