w1146869587
2022-03-04 2efb30bdc5c62273d77443180aba586f64c097f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
\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} (QString fileCompressed, QString file)
\begin{DoxyCompactList}\small\item\em Compress a single file. \end{DoxyCompactList}\item 
static bool {\bf compressFiles} (QString fileCompressed, QStringList files)
\begin{DoxyCompactList}\small\item\em Compress a list of files. \end{DoxyCompactList}\item 
static bool {\bf compressDir} (QString fileCompressed, QString dir=QString(), bool recursive=true)
\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item 
static bool {\bf compressDir} (QString fileCompressed, QString dir, bool recursive, QDir::Filters filters)
\begin{DoxyCompactList}\small\item\em Compress a whole directory. \end{DoxyCompactList}\item 
static QString {\bf extractFile} (QString fileCompressed, QString fileName, QString fileDest=QString())
\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item 
static QStringList {\bf extractFiles} (QString fileCompressed, QStringList files, QString dir=QString())
\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item 
static QStringList {\bf extractDir} (QString fileCompressed, QString dir=QString())
\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item 
static QStringList {\bf getFileList} (QString fileCompressed)
\begin{DoxyCompactList}\small\item\em Get the file list. \end{DoxyCompactList}\item 
static QString {\bf extractFile} (QIODevice $\ast$ioDevice, QString fileName, QString fileDest=QString())
\begin{DoxyCompactList}\small\item\em Extract a single file. \end{DoxyCompactList}\item 
static QStringList {\bf extractFiles} (QIODevice $\ast$ioDevice, QStringList files, QString dir=QString())
\begin{DoxyCompactList}\small\item\em Extract a list of files. \end{DoxyCompactList}\item 
static QStringList {\bf extractDir} (QIODevice $\ast$ioDevice, QString dir=QString())
\begin{DoxyCompactList}\small\item\em Extract a whole archive. \end{DoxyCompactList}\item 
static QStringList {\bf getFileList} (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[{QString}]{fileCompressed, }
\item[{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, and QuaZip::open().
 
\index{JlCompress@{JlCompress}!compressFiles@{compressFiles}}
\index{compressFiles@{compressFiles}!JlCompress@{JlCompress}}
\subsubsection[{compressFiles}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressFiles (
\begin{DoxyParamCaption}
\item[{QString}]{fileCompressed, }
\item[{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(), QuaZip::getZipError(), QuaZip::mdCreate, and QuaZip::open().
 
\index{JlCompress@{JlCompress}!compressDir@{compressDir}}
\index{compressDir@{compressDir}!JlCompress@{JlCompress}}
\subsubsection[{compressDir}]{\setlength{\rightskip}{0pt plus 5cm}bool JlCompress::compressDir (
\begin{DoxyParamCaption}
\item[{QString}]{fileCompressed, }
\item[{QString}]{dir = {\ttfamily 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[{QString}]{fileCompressed, }
\item[{QString}]{dir, }
\item[{bool}]{recursive, }
\item[{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, and QuaZip::open().
 
\index{JlCompress@{JlCompress}!extractFile@{extractFile}}
\index{extractFile@{extractFile}!JlCompress@{JlCompress}}
\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}QString JlCompress::extractFile (
\begin{DoxyParamCaption}
\item[{QString}]{fileCompressed, }
\item[{QString}]{fileName, }
\item[{QString}]{fileDest = {\ttfamily 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}QStringList JlCompress::extractFiles (
\begin{DoxyParamCaption}
\item[{QString}]{fileCompressed, }
\item[{QStringList}]{files, }
\item[{QString}]{dir = {\ttfamily 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}QStringList JlCompress::extractDir (
\begin{DoxyParamCaption}
\item[{QString}]{fileCompressed, }
\item[{QString}]{dir = {\ttfamily 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}QStringList JlCompress::getFileList (
\begin{DoxyParamCaption}
\item[{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}QString JlCompress::extractFile (
\begin{DoxyParamCaption}
\item[{QIODevice $\ast$}]{ioDevice, }
\item[{QString}]{fileName, }
\item[{QString}]{fileDest = {\ttfamily 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}QStringList JlCompress::extractFiles (
\begin{DoxyParamCaption}
\item[{QIODevice $\ast$}]{ioDevice, }
\item[{QStringList}]{files, }
\item[{QString}]{dir = {\ttfamily 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}QStringList JlCompress::extractDir (
\begin{DoxyParamCaption}
\item[{QIODevice $\ast$}]{ioDevice, }
\item[{QString}]{dir = {\ttfamily 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}QStringList JlCompress::getFileList (
\begin{DoxyParamCaption}
\item[{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}