source: s10k/CommonLibs/quazip-0.7.2/doc/latex/classJlCompress.tex

Last change on this file was 1096, checked in by s10k, 7 years ago

Added zlib, quazip, basicxmlsyntaxhighlighter, conditionalsemaphore and linenumberdisplay libraries. zlib and quazip are pre-compiled, but you can compile them yourself, just delete the dll files (or equivalent binary files to your OS)

File size: 13.5 KB
Line 
1\section{JlCompress Class Reference}
2\label{classJlCompress}\index{JlCompress@{JlCompress}}
3
4
5Utility class for typical operations.
6
7
8
9
10{\ttfamily \#include $<$JlCompress.h$>$}
11
12\subsection*{Static Public Member Functions}
13\begin{DoxyCompactItemize}
14\item
15static bool {\bf compressFile} ({\bf QString} fileCompressed, {\bf QString} file)
16\begin{DoxyCompactList}\small\item\em Compress a single file. \end{DoxyCompactList}\item
17static bool {\bf compressFiles} ({\bf QString} fileCompressed, {\bf QStringList} files)
18\begin{DoxyCompactList}\small\item\em Compress a list of files. \end{DoxyCompactList}\item
19static bool {\bf compressDir} ({\bf QString} fileCompressed, {\bf QString} dir={\bf QString}(), bool recursive=true)
20\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item
21static bool {\bf compressDir} ({\bf QString} fileCompressed, {\bf QString} dir, bool recursive, {\bf QDir::Filters} filters)
22\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item
23static {\bf QString} {\bf extractFile} ({\bf QString} fileCompressed, {\bf QString} fileName, {\bf QString} fileDest={\bf QString}())
24\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item
25static {\bf QStringList} {\bf extractFiles} ({\bf QString} fileCompressed, {\bf QStringList} files, {\bf QString} dir={\bf QString}())
26\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item
27static {\bf QStringList} {\bf extractDir} ({\bf QString} fileCompressed, {\bf QString} dir={\bf QString}())
28\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item
29static {\bf QStringList} {\bf getFileList} ({\bf QString} fileCompressed)
30\begin{DoxyCompactList}\small\item\em Get the file list. \end{DoxyCompactList}\item
31static {\bf QString} {\bf extractFile} ({\bf QIODevice} $\ast$ioDevice, {\bf QString} fileName, {\bf QString} fileDest={\bf QString}())
32\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item
33static {\bf QStringList} {\bf extractFiles} ({\bf QIODevice} $\ast$ioDevice, {\bf QStringList} files, {\bf QString} dir={\bf QString}())
34\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item
35static {\bf QStringList} {\bf extractDir} ({\bf QIODevice} $\ast$ioDevice, {\bf QString} dir={\bf QString}())
36\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item
37static {\bf QStringList} {\bf getFileList} ({\bf QIODevice} $\ast$ioDevice)
38\begin{DoxyCompactList}\small\item\em Get the file list. \end{DoxyCompactList}\end{DoxyCompactItemize}
39
40
41\subsection{Detailed Description}
42Utility class for typical operations.
43
44This class contains a number of useful static functions to perform simple operations, such as mass ZIP packing or extraction.
45
46\subsection{Member Function Documentation}
47\index{JlCompress@{JlCompress}!compressFile@{compressFile}}
48\index{compressFile@{compressFile}!JlCompress@{JlCompress}}
49\subsubsection[{compressFile}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressFile (
50\begin{DoxyParamCaption}
51\item[{{\bf QString}}]{fileCompressed, }
52\item[{{\bf QString}}]{file}
53\end{DoxyParamCaption}
54)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a4a4de9c62ecf161bb658d4d80495ea97}
55
56
57Compress a single file.
58
59
60\begin{DoxyParams}{Parameters}
61{\em fileCompressed} & The name of the archive. \\
62\hline
63{\em file} & The file to compress. \\
64\hline
65\end{DoxyParams}
66\begin{DoxyReturn}{Returns}
67true if success, false otherwise.
68\end{DoxyReturn}
69
70
71References QuaZip::close(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), and QFile::remove().
72
73\index{JlCompress@{JlCompress}!compressFiles@{compressFiles}}
74\index{compressFiles@{compressFiles}!JlCompress@{JlCompress}}
75\subsubsection[{compressFiles}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressFiles (
76\begin{DoxyParamCaption}
77\item[{{\bf QString}}]{fileCompressed, }
78\item[{{\bf QStringList}}]{files}
79\end{DoxyParamCaption}
80)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a9cdb92d29a94c6b13a718a3249685846}
81
82
83Compress a list of files.
84
85
86\begin{DoxyParams}{Parameters}
87{\em fileCompressed} & The name of the archive. \\
88\hline
89{\em files} & The file list to compress. \\
90\hline
91\end{DoxyParams}
92\begin{DoxyReturn}{Returns}
93true if success, false otherwise.
94\end{DoxyReturn}
95
96
97References QuaZip::close(), QFileInfo::exists(), QFileInfo::fileName(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), QFile::remove(), and QFileInfo::setFile().
98
99\index{JlCompress@{JlCompress}!compressDir@{compressDir}}
100\index{compressDir@{compressDir}!JlCompress@{JlCompress}}
101\subsubsection[{compressDir}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressDir (
102\begin{DoxyParamCaption}
103\item[{{\bf QString}}]{fileCompressed, }
104\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}, }
105\item[{bool}]{recursive = {\ttfamily true}}
106\end{DoxyParamCaption}
107)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a8708eafcadc5c192a1d492e784cfc98f}
108
109
110Compress a whole directory.
111
112Does not compress hidden files. See \doxyref{compressDir(QString, QString, bool, QDir::Filters)}{p.}{classJlCompress_ada7511686a24c014e9db25735be148a7}.
113
114
115\begin{DoxyParams}{Parameters}
116{\em fileCompressed} & The name of the archive. \\
117\hline
118{\em dir} & The directory to compress. \\
119\hline
120{\em recursive} & Whether to pack the subdirectories as well, or just regular files. \\
121\hline
122\end{DoxyParams}
123\begin{DoxyReturn}{Returns}
124true if success, false otherwise.
125\end{DoxyReturn}
126\index{JlCompress@{JlCompress}!compressDir@{compressDir}}
127\index{compressDir@{compressDir}!JlCompress@{JlCompress}}
128\subsubsection[{compressDir}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressDir (
129\begin{DoxyParamCaption}
130\item[{{\bf QString}}]{fileCompressed, }
131\item[{{\bf QString}}]{dir, }
132\item[{bool}]{recursive, }
133\item[{{\bf QDir::Filters}}]{filters}
134\end{DoxyParamCaption}
135)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_ada7511686a24c014e9db25735be148a7}
136
137
138Compress a whole directory.
139
140Unless 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.
141
142
143\begin{DoxyParams}{Parameters}
144{\em fileCompressed} & path to the resulting archive \\
145\hline
146{\em dir} & path to the directory being compressed \\
147\hline
148{\em recursive} & if true, then the subdirectories are packed as well \\
149\hline
150{\em filters} & what to pack, filters are applied both when searching for subdirs (if packing recursively) and when looking for files to pack \\
151\hline
152\end{DoxyParams}
153\begin{DoxyReturn}{Returns}
154true on success, false otherwise
155\end{DoxyReturn}
156
157
158References QuaZip::close(), QuaZip::getZipError(), QuaZip::mdCreate, QDir::mkpath(), QuaZip::open(), and QFile::remove().
159
160\index{JlCompress@{JlCompress}!extractFile@{extractFile}}
161\index{extractFile@{extractFile}!JlCompress@{JlCompress}}
162\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} JlCompress::extractFile (
163\begin{DoxyParamCaption}
164\item[{{\bf QString}}]{fileCompressed, }
165\item[{{\bf QString}}]{fileName, }
166\item[{{\bf QString}}]{fileDest = {\ttfamily {\bf QString}()}}
167\end{DoxyParamCaption}
168)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a38c0d58bfe3bbbcb3cf4e98d126633a3}
169
170
171Extract a single file.
172
173
174\begin{DoxyParams}{Parameters}
175{\em fileCompressed} & The name of the archive. \\
176\hline
177{\em fileName} & The file to extract. \\
178\hline
179{\em fileDest} & The destination file, assumed to be identical to {\itshape file\/} if left empty. \\
180\hline
181\end{DoxyParams}
182\begin{DoxyReturn}{Returns}
183The list of the full paths of the files extracted, empty on failure.
184\end{DoxyReturn}
185\index{JlCompress@{JlCompress}!extractFiles@{extractFiles}}
186\index{extractFiles@{extractFiles}!JlCompress@{JlCompress}}
187\subsubsection[{extractFiles}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractFiles (
188\begin{DoxyParamCaption}
189\item[{{\bf QString}}]{fileCompressed, }
190\item[{{\bf QStringList}}]{files, }
191\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
192\end{DoxyParamCaption}
193)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a309e9ee366719a4d8aa28f837fab73ae}
194
195
196Extract a list of files.
197
198
199\begin{DoxyParams}{Parameters}
200{\em fileCompressed} & The name of the archive. \\
201\hline
202{\em files} & The file list to extract. \\
203\hline
204{\em dir} & The directory to put the files to, the current directory if left empty. \\
205\hline
206\end{DoxyParams}
207\begin{DoxyReturn}{Returns}
208The list of the full paths of the files extracted, empty on failure.
209\end{DoxyReturn}
210\index{JlCompress@{JlCompress}!extractDir@{extractDir}}
211\index{extractDir@{extractDir}!JlCompress@{JlCompress}}
212\subsubsection[{extractDir}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractDir (
213\begin{DoxyParamCaption}
214\item[{{\bf QString}}]{fileCompressed, }
215\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
216\end{DoxyParamCaption}
217)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a365a153baa4c11812d93cbca60b6a293}
218
219
220Extract a whole archive.
221
222
223\begin{DoxyParams}{Parameters}
224{\em fileCompressed} & The name of the archive. \\
225\hline
226{\em dir} & The directory to extract to, the current directory if left empty. \\
227\hline
228\end{DoxyParams}
229\begin{DoxyReturn}{Returns}
230The list of the full paths of the files extracted, empty on failure.
231\end{DoxyReturn}
232\index{JlCompress@{JlCompress}!getFileList@{getFileList}}
233\index{getFileList@{getFileList}!JlCompress@{JlCompress}}
234\subsubsection[{getFileList}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::getFileList (
235\begin{DoxyParamCaption}
236\item[{{\bf QString}}]{fileCompressed}
237\end{DoxyParamCaption}
238)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_ab42422be913f817d7e04c1b1cd5d0156}
239
240
241Get the file list.
242
243\begin{DoxyReturn}{Returns}
244The 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.
245\end{DoxyReturn}
246\index{JlCompress@{JlCompress}!extractFile@{extractFile}}
247\index{extractFile@{extractFile}!JlCompress@{JlCompress}}
248\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} JlCompress::extractFile (
249\begin{DoxyParamCaption}
250\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
251\item[{{\bf QString}}]{fileName, }
252\item[{{\bf QString}}]{fileDest = {\ttfamily {\bf QString}()}}
253\end{DoxyParamCaption}
254)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_ae789e7e744129a0429dc976fdcd33eac}
255
256
257Extract a single file.
258
259
260\begin{DoxyParams}{Parameters}
261{\em ioDevice} & pointer to device with compressed data. \\
262\hline
263{\em fileName} & The file to extract. \\
264\hline
265{\em fileDest} & The destination file, assumed to be identical to {\itshape file\/} if left empty. \\
266\hline
267\end{DoxyParams}
268\begin{DoxyReturn}{Returns}
269The list of the full paths of the files extracted, empty on failure.
270\end{DoxyReturn}
271\index{JlCompress@{JlCompress}!extractFiles@{extractFiles}}
272\index{extractFiles@{extractFiles}!JlCompress@{JlCompress}}
273\subsubsection[{extractFiles}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractFiles (
274\begin{DoxyParamCaption}
275\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
276\item[{{\bf QStringList}}]{files, }
277\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
278\end{DoxyParamCaption}
279)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a741646b1e2a922b3c48c2627fdc35f5b}
280
281
282Extract a list of files.
283
284
285\begin{DoxyParams}{Parameters}
286{\em ioDevice} & pointer to device with compressed data. \\
287\hline
288{\em files} & The file list to extract. \\
289\hline
290{\em dir} & The directory to put the files to, the current directory if left empty. \\
291\hline
292\end{DoxyParams}
293\begin{DoxyReturn}{Returns}
294The list of the full paths of the files extracted, empty on failure.
295\end{DoxyReturn}
296\index{JlCompress@{JlCompress}!extractDir@{extractDir}}
297\index{extractDir@{extractDir}!JlCompress@{JlCompress}}
298\subsubsection[{extractDir}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::extractDir (
299\begin{DoxyParamCaption}
300\item[{{\bf QIODevice} $\ast$}]{ioDevice, }
301\item[{{\bf QString}}]{dir = {\ttfamily {\bf QString}()}}
302\end{DoxyParamCaption}
303)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_ac7877bcdf951d634cc2e1e6afe52e908}
304
305
306Extract a whole archive.
307
308
309\begin{DoxyParams}{Parameters}
310{\em ioDevice} & pointer to device with compressed data. \\
311\hline
312{\em dir} & The directory to extract to, the current directory if left empty. \\
313\hline
314\end{DoxyParams}
315\begin{DoxyReturn}{Returns}
316The list of the full paths of the files extracted, empty on failure.
317\end{DoxyReturn}
318\index{JlCompress@{JlCompress}!getFileList@{getFileList}}
319\index{getFileList@{getFileList}!JlCompress@{JlCompress}}
320\subsubsection[{getFileList}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QStringList} JlCompress::getFileList (
321\begin{DoxyParamCaption}
322\item[{{\bf QIODevice} $\ast$}]{ioDevice}
323\end{DoxyParamCaption}
324)\hspace{0.3cm}{\ttfamily [static]}}\label{classJlCompress_a4ae5501a229d15f228cc034fc97cf78d}
325
326
327Get the file list.
328
329\begin{DoxyReturn}{Returns}
330The 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.
331\end{DoxyReturn}
332
333
334The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
335\item
336quazip/JlCompress.h\item
337quazip/JlCompress.cpp\end{DoxyCompactItemize}
Note: See TracBrowser for help on using the repository browser.