1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
3 |
<head> |
4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
5 |
<title>QuaZIP: JlCompress Class Reference</title> |
6 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
7 |
<link href="doxygen.css" rel="stylesheet" type="text/css"/> |
8 |
</head> |
9 |
<body> |
10 |
<!-- Generated by Doxygen 1.7.4 --> |
11 |
<div id="top"> |
12 |
<div id="titlearea"> |
13 |
<table cellspacing="0" cellpadding="0"> |
14 |
<tbody> |
15 |
<tr style="height: 56px;"> |
16 |
<td style="padding-left: 0.5em;"> |
17 |
<div id="projectname">QuaZIP <span id="projectnumber">quazip-0-7-2</span></div> |
18 |
</td> |
19 |
</tr> |
20 |
</tbody> |
21 |
</table> |
22 |
</div> |
23 |
<div id="navrow1" class="tabs"> |
24 |
<ul class="tablist"> |
25 |
<li><a href="index.html"><span>Main Page</span></a></li> |
26 |
<li><a href="pages.html"><span>Related Pages</span></a></li> |
27 |
<li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
28 |
<li><a href="files.html"><span>Files</span></a></li> |
29 |
<li><a href="dirs.html"><span>Directories</span></a></li> |
30 |
</ul> |
31 |
</div> |
32 |
<div id="navrow2" class="tabs2"> |
33 |
<ul class="tablist"> |
34 |
<li><a href="annotated.html"><span>Class List</span></a></li> |
35 |
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li> |
36 |
<li><a href="functions.html"><span>Class Members</span></a></li> |
37 |
</ul> |
38 |
</div> |
39 |
</div> |
40 |
<div class="header"> |
41 |
<div class="summary"> |
42 |
<a href="#pub-static-methods">Static Public Member Functions</a> </div> |
43 |
<div class="headertitle"> |
44 |
<div class="title">JlCompress Class Reference</div> </div> |
45 |
</div> |
46 |
<div class="contents"> |
47 |
<!-- doxytag: class="JlCompress" --> |
48 |
<p>Utility class for typical operations. |
49 |
<a href="classJlCompress.html#details">More...</a></p> |
50 |
|
51 |
<p><code>#include <<a class="el" href="JlCompress_8h_source.html">JlCompress.h</a>></code></p> |
52 |
|
53 |
<p><a href="classJlCompress-members.html">List of all members.</a></p> |
54 |
<table class="memberdecls"> |
55 |
<tr><td colspan="2"><h2><a name="pub-static-methods"></a> |
56 |
Static Public Member Functions</h2></td></tr> |
57 |
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a4a4de9c62ecf161bb658d4d80495ea97">compressFile</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> file)</td></tr> |
58 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compress a single file. <a href="#a4a4de9c62ecf161bb658d4d80495ea97"></a><br/></td></tr> |
59 |
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a9cdb92d29a94c6b13a718a3249685846">compressFiles</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> files)</td></tr> |
60 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compress a list of files. <a href="#a9cdb92d29a94c6b13a718a3249685846"></a><br/></td></tr> |
61 |
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a8708eafcadc5c192a1d492e784cfc98f">compressDir</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>(), bool recursive=true)</td></tr> |
62 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compress a whole directory. <a href="#a8708eafcadc5c192a1d492e784cfc98f"></a><br/></td></tr> |
63 |
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#ada7511686a24c014e9db25735be148a7">compressDir</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir, bool recursive, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdir.html#Filter-enum">QDir::Filters</a> filters)</td></tr> |
64 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compress a whole directory. <a href="#ada7511686a24c014e9db25735be148a7"></a><br/></td></tr> |
65 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a38c0d58bfe3bbbcb3cf4e98d126633a3">extractFile</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileName, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileDest=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
66 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a single file. <a href="#a38c0d58bfe3bbbcb3cf4e98d126633a3"></a><br/></td></tr> |
67 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a309e9ee366719a4d8aa28f837fab73ae">extractFiles</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> files, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
68 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a list of files. <a href="#a309e9ee366719a4d8aa28f837fab73ae"></a><br/></td></tr> |
69 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a365a153baa4c11812d93cbca60b6a293">extractDir</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
70 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a whole archive. <a href="#a365a153baa4c11812d93cbca60b6a293"></a><br/></td></tr> |
71 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#ab42422be913f817d7e04c1b1cd5d0156">getFileList</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileCompressed)</td></tr> |
72 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the file list. <a href="#ab42422be913f817d7e04c1b1cd5d0156"></a><br/></td></tr> |
73 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#ae789e7e744129a0429dc976fdcd33eac">extractFile</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> *ioDevice, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileName, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> fileDest=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
74 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a single file. <a href="#ae789e7e744129a0429dc976fdcd33eac"></a><br/></td></tr> |
75 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a741646b1e2a922b3c48c2627fdc35f5b">extractFiles</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> *ioDevice, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> files, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
76 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a list of files. <a href="#a741646b1e2a922b3c48c2627fdc35f5b"></a><br/></td></tr> |
77 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#ac7877bcdf951d634cc2e1e6afe52e908">extractDir</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> *ioDevice, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> dir=<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>())</td></tr> |
78 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a whole archive. <a href="#ac7877bcdf951d634cc2e1e6afe52e908"></a><br/></td></tr> |
79 |
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classJlCompress.html#a4ae5501a229d15f228cc034fc97cf78d">getFileList</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> *ioDevice)</td></tr> |
80 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the file list. <a href="#a4ae5501a229d15f228cc034fc97cf78d"></a><br/></td></tr> |
81 |
</table> |
82 |
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2> |
83 |
<div class="textblock"><p>Utility class for typical operations. </p> |
84 |
<p>This class contains a number of useful static functions to perform simple operations, such as mass ZIP packing or extraction. </p> |
85 |
</div><hr/><h2>Member Function Documentation</h2> |
86 |
<a class="anchor" id="a4a4de9c62ecf161bb658d4d80495ea97"></a><!-- doxytag: member="JlCompress::compressFile" ref="a4a4de9c62ecf161bb658d4d80495ea97" args="(QString fileCompressed, QString file)" --> |
87 |
<div class="memitem"> |
88 |
<div class="memproto"> |
89 |
<table class="memname"> |
90 |
<tr> |
91 |
<td class="memname">bool JlCompress::compressFile </td> |
92 |
<td>(</td> |
93 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
94 |
<td class="paramname"><em>fileCompressed</em>, </td> |
95 |
</tr> |
96 |
<tr> |
97 |
<td class="paramkey"></td> |
98 |
<td></td> |
99 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
100 |
<td class="paramname"><em>file</em> </td> |
101 |
</tr> |
102 |
<tr> |
103 |
<td></td> |
104 |
<td>)</td> |
105 |
<td></td><td><code> [static]</code></td> |
106 |
</tr> |
107 |
</table> |
108 |
</div> |
109 |
<div class="memdoc"> |
110 |
|
111 |
<p>Compress a single file. </p> |
112 |
<dl><dt><b>Parameters:</b></dt><dd> |
113 |
<table class="params"> |
114 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
115 |
<tr><td class="paramname">file</td><td>The file to compress. </td></tr> |
116 |
</table> |
117 |
</dd> |
118 |
</dl> |
119 |
<dl class="return"><dt><b>Returns:</b></dt><dd>true if success, false otherwise. </dd></dl> |
120 |
|
121 |
<p>References <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f">QuaZip::close()</a>, <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4">QuaZip::getZipError()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">QuaZip::mdCreate</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdir.html#mkpath">QDir::mkpath()</a>, <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962">QuaZip::open()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfile.html#remove">QFile::remove()</a>.</p> |
122 |
|
123 |
</div> |
124 |
</div> |
125 |
<a class="anchor" id="a9cdb92d29a94c6b13a718a3249685846"></a><!-- doxytag: member="JlCompress::compressFiles" ref="a9cdb92d29a94c6b13a718a3249685846" args="(QString fileCompressed, QStringList files)" --> |
126 |
<div class="memitem"> |
127 |
<div class="memproto"> |
128 |
<table class="memname"> |
129 |
<tr> |
130 |
<td class="memname">bool JlCompress::compressFiles </td> |
131 |
<td>(</td> |
132 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
133 |
<td class="paramname"><em>fileCompressed</em>, </td> |
134 |
</tr> |
135 |
<tr> |
136 |
<td class="paramkey"></td> |
137 |
<td></td> |
138 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td> |
139 |
<td class="paramname"><em>files</em> </td> |
140 |
</tr> |
141 |
<tr> |
142 |
<td></td> |
143 |
<td>)</td> |
144 |
<td></td><td><code> [static]</code></td> |
145 |
</tr> |
146 |
</table> |
147 |
</div> |
148 |
<div class="memdoc"> |
149 |
|
150 |
<p>Compress a list of files. </p> |
151 |
<dl><dt><b>Parameters:</b></dt><dd> |
152 |
<table class="params"> |
153 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
154 |
<tr><td class="paramname">files</td><td>The file list to compress. </td></tr> |
155 |
</table> |
156 |
</dd> |
157 |
</dl> |
158 |
<dl class="return"><dt><b>Returns:</b></dt><dd>true if success, false otherwise. </dd></dl> |
159 |
|
160 |
<p>References <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f">QuaZip::close()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#exists">QFileInfo::exists()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#fileName">QFileInfo::fileName()</a>, <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4">QuaZip::getZipError()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">QuaZip::mdCreate</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdir.html#mkpath">QDir::mkpath()</a>, <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962">QuaZip::open()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfile.html#remove">QFile::remove()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#setFile">QFileInfo::setFile()</a>.</p> |
161 |
|
162 |
</div> |
163 |
</div> |
164 |
<a class="anchor" id="a8708eafcadc5c192a1d492e784cfc98f"></a><!-- doxytag: member="JlCompress::compressDir" ref="a8708eafcadc5c192a1d492e784cfc98f" args="(QString fileCompressed, QString dir=QString(), bool recursive=true)" --> |
165 |
<div class="memitem"> |
166 |
<div class="memproto"> |
167 |
<table class="memname"> |
168 |
<tr> |
169 |
<td class="memname">bool JlCompress::compressDir </td> |
170 |
<td>(</td> |
171 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
172 |
<td class="paramname"><em>fileCompressed</em>, </td> |
173 |
</tr> |
174 |
<tr> |
175 |
<td class="paramkey"></td> |
176 |
<td></td> |
177 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
178 |
<td class="paramname"><em>dir</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code>, </td> |
179 |
</tr> |
180 |
<tr> |
181 |
<td class="paramkey"></td> |
182 |
<td></td> |
183 |
<td class="paramtype">bool </td> |
184 |
<td class="paramname"><em>recursive</em> = <code>true</code> </td> |
185 |
</tr> |
186 |
<tr> |
187 |
<td></td> |
188 |
<td>)</td> |
189 |
<td></td><td><code> [static]</code></td> |
190 |
</tr> |
191 |
</table> |
192 |
</div> |
193 |
<div class="memdoc"> |
194 |
|
195 |
<p>Compress a whole directory. </p> |
196 |
<p>Does not compress hidden files. See <a class="el" href="classJlCompress.html#ada7511686a24c014e9db25735be148a7" title="Compress a whole directory.">compressDir(QString, QString, bool, QDir::Filters)</a>.</p> |
197 |
<dl><dt><b>Parameters:</b></dt><dd> |
198 |
<table class="params"> |
199 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
200 |
<tr><td class="paramname">dir</td><td>The directory to compress. </td></tr> |
201 |
<tr><td class="paramname">recursive</td><td>Whether to pack the subdirectories as well, or just regular files. </td></tr> |
202 |
</table> |
203 |
</dd> |
204 |
</dl> |
205 |
<dl class="return"><dt><b>Returns:</b></dt><dd>true if success, false otherwise. </dd></dl> |
206 |
|
207 |
</div> |
208 |
</div> |
209 |
<a class="anchor" id="ada7511686a24c014e9db25735be148a7"></a><!-- doxytag: member="JlCompress::compressDir" ref="ada7511686a24c014e9db25735be148a7" args="(QString fileCompressed, QString dir, bool recursive, QDir::Filters filters)" --> |
210 |
<div class="memitem"> |
211 |
<div class="memproto"> |
212 |
<table class="memname"> |
213 |
<tr> |
214 |
<td class="memname">bool JlCompress::compressDir </td> |
215 |
<td>(</td> |
216 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
217 |
<td class="paramname"><em>fileCompressed</em>, </td> |
218 |
</tr> |
219 |
<tr> |
220 |
<td class="paramkey"></td> |
221 |
<td></td> |
222 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
223 |
<td class="paramname"><em>dir</em>, </td> |
224 |
</tr> |
225 |
<tr> |
226 |
<td class="paramkey"></td> |
227 |
<td></td> |
228 |
<td class="paramtype">bool </td> |
229 |
<td class="paramname"><em>recursive</em>, </td> |
230 |
</tr> |
231 |
<tr> |
232 |
<td class="paramkey"></td> |
233 |
<td></td> |
234 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdir.html#Filter-enum">QDir::Filters</a> </td> |
235 |
<td class="paramname"><em>filters</em> </td> |
236 |
</tr> |
237 |
<tr> |
238 |
<td></td> |
239 |
<td>)</td> |
240 |
<td></td><td><code> [static]</code></td> |
241 |
</tr> |
242 |
</table> |
243 |
</div> |
244 |
<div class="memdoc"> |
245 |
|
246 |
<p>Compress a whole directory. </p> |
247 |
<p>Unless filters are specified explicitly, packs only regular non-hidden files (and subdirs, if <code>recursive</code> is true). If filters are specified, they are OR-combined with <code>QDir::AllDirs|QDir::NoDotAndDotDot</code> when searching for dirs and with <code>QDir::Files</code> when searching for files.</p> |
248 |
<dl><dt><b>Parameters:</b></dt><dd> |
249 |
<table class="params"> |
250 |
<tr><td class="paramname">fileCompressed</td><td>path to the resulting archive </td></tr> |
251 |
<tr><td class="paramname">dir</td><td>path to the directory being compressed </td></tr> |
252 |
<tr><td class="paramname">recursive</td><td>if true, then the subdirectories are packed as well </td></tr> |
253 |
<tr><td class="paramname">filters</td><td>what to pack, filters are applied both when searching for subdirs (if packing recursively) and when looking for files to pack </td></tr> |
254 |
</table> |
255 |
</dd> |
256 |
</dl> |
257 |
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false otherwise </dd></dl> |
258 |
|
259 |
<p>References <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f">QuaZip::close()</a>, <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4">QuaZip::getZipError()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">QuaZip::mdCreate</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdir.html#mkpath">QDir::mkpath()</a>, <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962">QuaZip::open()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfile.html#remove">QFile::remove()</a>.</p> |
260 |
|
261 |
</div> |
262 |
</div> |
263 |
<a class="anchor" id="a38c0d58bfe3bbbcb3cf4e98d126633a3"></a><!-- doxytag: member="JlCompress::extractFile" ref="a38c0d58bfe3bbbcb3cf4e98d126633a3" args="(QString fileCompressed, QString fileName, QString fileDest=QString())" --> |
264 |
<div class="memitem"> |
265 |
<div class="memproto"> |
266 |
<table class="memname"> |
267 |
<tr> |
268 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> JlCompress::extractFile </td> |
269 |
<td>(</td> |
270 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
271 |
<td class="paramname"><em>fileCompressed</em>, </td> |
272 |
</tr> |
273 |
<tr> |
274 |
<td class="paramkey"></td> |
275 |
<td></td> |
276 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
277 |
<td class="paramname"><em>fileName</em>, </td> |
278 |
</tr> |
279 |
<tr> |
280 |
<td class="paramkey"></td> |
281 |
<td></td> |
282 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
283 |
<td class="paramname"><em>fileDest</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
284 |
</tr> |
285 |
<tr> |
286 |
<td></td> |
287 |
<td>)</td> |
288 |
<td></td><td><code> [static]</code></td> |
289 |
</tr> |
290 |
</table> |
291 |
</div> |
292 |
<div class="memdoc"> |
293 |
|
294 |
<p>Extract a single file. </p> |
295 |
<dl><dt><b>Parameters:</b></dt><dd> |
296 |
<table class="params"> |
297 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
298 |
<tr><td class="paramname">fileName</td><td>The file to extract. </td></tr> |
299 |
<tr><td class="paramname">fileDest</td><td>The destination file, assumed to be identical to <em>file</em> if left empty. </td></tr> |
300 |
</table> |
301 |
</dd> |
302 |
</dl> |
303 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
304 |
|
305 |
</div> |
306 |
</div> |
307 |
<a class="anchor" id="a309e9ee366719a4d8aa28f837fab73ae"></a><!-- doxytag: member="JlCompress::extractFiles" ref="a309e9ee366719a4d8aa28f837fab73ae" args="(QString fileCompressed, QStringList files, QString dir=QString())" --> |
308 |
<div class="memitem"> |
309 |
<div class="memproto"> |
310 |
<table class="memname"> |
311 |
<tr> |
312 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::extractFiles </td> |
313 |
<td>(</td> |
314 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
315 |
<td class="paramname"><em>fileCompressed</em>, </td> |
316 |
</tr> |
317 |
<tr> |
318 |
<td class="paramkey"></td> |
319 |
<td></td> |
320 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td> |
321 |
<td class="paramname"><em>files</em>, </td> |
322 |
</tr> |
323 |
<tr> |
324 |
<td class="paramkey"></td> |
325 |
<td></td> |
326 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
327 |
<td class="paramname"><em>dir</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
328 |
</tr> |
329 |
<tr> |
330 |
<td></td> |
331 |
<td>)</td> |
332 |
<td></td><td><code> [static]</code></td> |
333 |
</tr> |
334 |
</table> |
335 |
</div> |
336 |
<div class="memdoc"> |
337 |
|
338 |
<p>Extract a list of files. </p> |
339 |
<dl><dt><b>Parameters:</b></dt><dd> |
340 |
<table class="params"> |
341 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
342 |
<tr><td class="paramname">files</td><td>The file list to extract. </td></tr> |
343 |
<tr><td class="paramname">dir</td><td>The directory to put the files to, the current directory if left empty. </td></tr> |
344 |
</table> |
345 |
</dd> |
346 |
</dl> |
347 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
348 |
|
349 |
</div> |
350 |
</div> |
351 |
<a class="anchor" id="a365a153baa4c11812d93cbca60b6a293"></a><!-- doxytag: member="JlCompress::extractDir" ref="a365a153baa4c11812d93cbca60b6a293" args="(QString fileCompressed, QString dir=QString())" --> |
352 |
<div class="memitem"> |
353 |
<div class="memproto"> |
354 |
<table class="memname"> |
355 |
<tr> |
356 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::extractDir </td> |
357 |
<td>(</td> |
358 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
359 |
<td class="paramname"><em>fileCompressed</em>, </td> |
360 |
</tr> |
361 |
<tr> |
362 |
<td class="paramkey"></td> |
363 |
<td></td> |
364 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
365 |
<td class="paramname"><em>dir</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
366 |
</tr> |
367 |
<tr> |
368 |
<td></td> |
369 |
<td>)</td> |
370 |
<td></td><td><code> [static]</code></td> |
371 |
</tr> |
372 |
</table> |
373 |
</div> |
374 |
<div class="memdoc"> |
375 |
|
376 |
<p>Extract a whole archive. </p> |
377 |
<dl><dt><b>Parameters:</b></dt><dd> |
378 |
<table class="params"> |
379 |
<tr><td class="paramname">fileCompressed</td><td>The name of the archive. </td></tr> |
380 |
<tr><td class="paramname">dir</td><td>The directory to extract to, the current directory if left empty. </td></tr> |
381 |
</table> |
382 |
</dd> |
383 |
</dl> |
384 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
385 |
|
386 |
</div> |
387 |
</div> |
388 |
<a class="anchor" id="ab42422be913f817d7e04c1b1cd5d0156"></a><!-- doxytag: member="JlCompress::getFileList" ref="ab42422be913f817d7e04c1b1cd5d0156" args="(QString fileCompressed)" --> |
389 |
<div class="memitem"> |
390 |
<div class="memproto"> |
391 |
<table class="memname"> |
392 |
<tr> |
393 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::getFileList </td> |
394 |
<td>(</td> |
395 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
396 |
<td class="paramname"><em>fileCompressed</em></td><td>)</td> |
397 |
<td><code> [static]</code></td> |
398 |
</tr> |
399 |
</table> |
400 |
</div> |
401 |
<div class="memdoc"> |
402 |
|
403 |
<p>Get the file list. </p> |
404 |
<dl class="return"><dt><b>Returns:</b></dt><dd>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. </dd></dl> |
405 |
|
406 |
</div> |
407 |
</div> |
408 |
<a class="anchor" id="ae789e7e744129a0429dc976fdcd33eac"></a><!-- doxytag: member="JlCompress::extractFile" ref="ae789e7e744129a0429dc976fdcd33eac" args="(QIODevice *ioDevice, QString fileName, QString fileDest=QString())" --> |
409 |
<div class="memitem"> |
410 |
<div class="memproto"> |
411 |
<table class="memname"> |
412 |
<tr> |
413 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> JlCompress::extractFile </td> |
414 |
<td>(</td> |
415 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * </td> |
416 |
<td class="paramname"><em>ioDevice</em>, </td> |
417 |
</tr> |
418 |
<tr> |
419 |
<td class="paramkey"></td> |
420 |
<td></td> |
421 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
422 |
<td class="paramname"><em>fileName</em>, </td> |
423 |
</tr> |
424 |
<tr> |
425 |
<td class="paramkey"></td> |
426 |
<td></td> |
427 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
428 |
<td class="paramname"><em>fileDest</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
429 |
</tr> |
430 |
<tr> |
431 |
<td></td> |
432 |
<td>)</td> |
433 |
<td></td><td><code> [static]</code></td> |
434 |
</tr> |
435 |
</table> |
436 |
</div> |
437 |
<div class="memdoc"> |
438 |
|
439 |
<p>Extract a single file. </p> |
440 |
<dl><dt><b>Parameters:</b></dt><dd> |
441 |
<table class="params"> |
442 |
<tr><td class="paramname">ioDevice</td><td>pointer to device with compressed data. </td></tr> |
443 |
<tr><td class="paramname">fileName</td><td>The file to extract. </td></tr> |
444 |
<tr><td class="paramname">fileDest</td><td>The destination file, assumed to be identical to <em>file</em> if left empty. </td></tr> |
445 |
</table> |
446 |
</dd> |
447 |
</dl> |
448 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
449 |
|
450 |
</div> |
451 |
</div> |
452 |
<a class="anchor" id="a741646b1e2a922b3c48c2627fdc35f5b"></a><!-- doxytag: member="JlCompress::extractFiles" ref="a741646b1e2a922b3c48c2627fdc35f5b" args="(QIODevice *ioDevice, QStringList files, QString dir=QString())" --> |
453 |
<div class="memitem"> |
454 |
<div class="memproto"> |
455 |
<table class="memname"> |
456 |
<tr> |
457 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::extractFiles </td> |
458 |
<td>(</td> |
459 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * </td> |
460 |
<td class="paramname"><em>ioDevice</em>, </td> |
461 |
</tr> |
462 |
<tr> |
463 |
<td class="paramkey"></td> |
464 |
<td></td> |
465 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> </td> |
466 |
<td class="paramname"><em>files</em>, </td> |
467 |
</tr> |
468 |
<tr> |
469 |
<td class="paramkey"></td> |
470 |
<td></td> |
471 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
472 |
<td class="paramname"><em>dir</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
473 |
</tr> |
474 |
<tr> |
475 |
<td></td> |
476 |
<td>)</td> |
477 |
<td></td><td><code> [static]</code></td> |
478 |
</tr> |
479 |
</table> |
480 |
</div> |
481 |
<div class="memdoc"> |
482 |
|
483 |
<p>Extract a list of files. </p> |
484 |
<dl><dt><b>Parameters:</b></dt><dd> |
485 |
<table class="params"> |
486 |
<tr><td class="paramname">ioDevice</td><td>pointer to device with compressed data. </td></tr> |
487 |
<tr><td class="paramname">files</td><td>The file list to extract. </td></tr> |
488 |
<tr><td class="paramname">dir</td><td>The directory to put the files to, the current directory if left empty. </td></tr> |
489 |
</table> |
490 |
</dd> |
491 |
</dl> |
492 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
493 |
|
494 |
</div> |
495 |
</div> |
496 |
<a class="anchor" id="ac7877bcdf951d634cc2e1e6afe52e908"></a><!-- doxytag: member="JlCompress::extractDir" ref="ac7877bcdf951d634cc2e1e6afe52e908" args="(QIODevice *ioDevice, QString dir=QString())" --> |
497 |
<div class="memitem"> |
498 |
<div class="memproto"> |
499 |
<table class="memname"> |
500 |
<tr> |
501 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::extractDir </td> |
502 |
<td>(</td> |
503 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * </td> |
504 |
<td class="paramname"><em>ioDevice</em>, </td> |
505 |
</tr> |
506 |
<tr> |
507 |
<td class="paramkey"></td> |
508 |
<td></td> |
509 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> </td> |
510 |
<td class="paramname"><em>dir</em> = <code><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a>()</code> </td> |
511 |
</tr> |
512 |
<tr> |
513 |
<td></td> |
514 |
<td>)</td> |
515 |
<td></td><td><code> [static]</code></td> |
516 |
</tr> |
517 |
</table> |
518 |
</div> |
519 |
<div class="memdoc"> |
520 |
|
521 |
<p>Extract a whole archive. </p> |
522 |
<dl><dt><b>Parameters:</b></dt><dd> |
523 |
<table class="params"> |
524 |
<tr><td class="paramname">ioDevice</td><td>pointer to device with compressed data. </td></tr> |
525 |
<tr><td class="paramname">dir</td><td>The directory to extract to, the current directory if left empty. </td></tr> |
526 |
</table> |
527 |
</dd> |
528 |
</dl> |
529 |
<dl class="return"><dt><b>Returns:</b></dt><dd>The list of the full paths of the files extracted, empty on failure. </dd></dl> |
530 |
|
531 |
</div> |
532 |
</div> |
533 |
<a class="anchor" id="a4ae5501a229d15f228cc034fc97cf78d"></a><!-- doxytag: member="JlCompress::getFileList" ref="a4ae5501a229d15f228cc034fc97cf78d" args="(QIODevice *ioDevice)" --> |
534 |
<div class="memitem"> |
535 |
<div class="memproto"> |
536 |
<table class="memname"> |
537 |
<tr> |
538 |
<td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstringlist.html">QStringList</a> JlCompress::getFileList </td> |
539 |
<td>(</td> |
540 |
<td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * </td> |
541 |
<td class="paramname"><em>ioDevice</em></td><td>)</td> |
542 |
<td><code> [static]</code></td> |
543 |
</tr> |
544 |
</table> |
545 |
</div> |
546 |
<div class="memdoc"> |
547 |
|
548 |
<p>Get the file list. </p> |
549 |
<dl class="return"><dt><b>Returns:</b></dt><dd>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. </dd></dl> |
550 |
|
551 |
</div> |
552 |
</div> |
553 |
<hr/>The documentation for this class was generated from the following files:<ul> |
554 |
<li>quazip/<a class="el" href="JlCompress_8h_source.html">JlCompress.h</a></li> |
555 |
<li>quazip/JlCompress.cpp</li> |
556 |
</ul> |
557 |
</div> |
558 |
<hr class="footer"/><address class="footer"><small>Generated on Sun Apr 3 2016 08:26:25 for QuaZIP by  |
559 |
<a href="http://www.doxygen.org/index.html"> |
560 |
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> |
561 |
</body> |
562 |
</html> |