[1050] | 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: QuaZip 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-types">Public Types</a> |
|
---|
| 43 | <a href="#pub-methods">Public Member Functions</a> |
|
---|
| 44 | <a href="#pub-static-methods">Static Public Member Functions</a> |
|
---|
| 45 | <a href="#friends">Friends</a> </div>
|
---|
| 46 | <div class="headertitle">
|
---|
| 47 | <div class="title">QuaZip Class Reference</div> </div>
|
---|
| 48 | </div>
|
---|
| 49 | <div class="contents">
|
---|
| 50 | <!-- doxytag: class="QuaZip" -->
|
---|
| 51 | <p>ZIP archive.
|
---|
| 52 | <a href="classQuaZip.html#details">More...</a></p>
|
---|
| 53 |
|
---|
| 54 | <p><code>#include <<a class="el" href="quazip_8h_source.html">quazip/quazip.h</a>></code></p>
|
---|
| 55 | <div class="dynheader">
|
---|
| 56 | Collaboration diagram for QuaZip:</div>
|
---|
| 57 | <div class="dyncontent">
|
---|
| 58 | <div class="center"><img src="classQuaZip__coll__graph.png" border="0" usemap="#QuaZip_coll__map" alt="Collaboration graph"/></div>
|
---|
| 59 | <map name="QuaZip_coll__map" id="QuaZip_coll__map">
|
---|
| 60 | <area shape="rect" id="node2" href="classQuaZipPrivate.html" title="All the internal stuff for the QuaZip class." alt="" coords="239,203,341,229"/>
|
---|
| 61 | <area shape="rect" id="node5" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qhash.html" title="QHash\< QString, unz64_file_pos \>" alt="" coords="92,83,316,109"/>
|
---|
| 62 | <area shape="rect" id="node7" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html" title="QIODevice" alt="" coords="340,83,423,109"/>
|
---|
| 63 | <area shape="rect" id="node9" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qobject.html" title="QObject" alt="" coords="346,5,416,32"/>
|
---|
| 64 | <area shape="rect" id="node11" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html" title="QString" alt="" coords="447,83,513,109"/>
|
---|
| 65 | <area shape="rect" id="node13" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html" title="QTextCodec" alt="" coords="538,83,632,109"/>
|
---|
| 66 | </map>
|
---|
| 67 | <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
---|
| 68 |
|
---|
| 69 | <p><a href="classQuaZip-members.html">List of all members.</a></p>
|
---|
| 70 | <table class="memberdecls">
|
---|
| 71 | <tr><td colspan="2"><h2><a name="pub-types"></a>
|
---|
| 72 | Public Types</h2></td></tr>
|
---|
| 73 | <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#adce46b942c341dbb5c851eadead65459">Constants</a> { <a class="el" href="classQuaZip.html#adce46b942c341dbb5c851eadead65459ab26ce1a9c9e94f901dc2cf90fa5baa4b">MAX_FILE_NAME_LENGTH</a> = 256
|
---|
| 74 | }</td></tr>
|
---|
| 75 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Useful constants. <a href="classQuaZip.html#adce46b942c341dbb5c851eadead65459">More...</a><br/></td></tr>
|
---|
| 76 | <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">Mode</a> { <br/>
|
---|
| 77 |   <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4ac87ddb1e901e1ec700c16ee0d4d398ce">mdNotOpen</a>,
|
---|
| 78 | <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>,
|
---|
| 79 | <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">mdCreate</a>,
|
---|
| 80 | <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4ab807f0c65653a16d77b365801fd25582">mdAppend</a>,
|
---|
| 81 | <br/>
|
---|
| 82 |   <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec">mdAdd</a>
|
---|
| 83 | <br/>
|
---|
| 84 | }</td></tr>
|
---|
| 85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Open mode of the ZIP file. <a href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">More...</a><br/></td></tr>
|
---|
| 86 | <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">CaseSensitivity</a> { <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbeac3cca8c0b976cf6397a28a5c84e75253">csDefault</a> = 0,
|
---|
| 87 | <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbead8d86b0c34203336cad09348cfa5356e">csSensitive</a> = 1,
|
---|
| 88 | <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbea3e492bcc3f64f41a74906cecc45fb366">csInsensitive</a> = 2
|
---|
| 89 | }</td></tr>
|
---|
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Case sensitivity for the file names. <a href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">More...</a><br/></td></tr>
|
---|
| 91 | <tr><td colspan="2"><h2><a name="pub-methods"></a>
|
---|
| 92 | Public Member Functions</h2></td></tr>
|
---|
| 93 | <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a970e0f401c7cfd7a78e78572f758eec4">QuaZip</a> ()</td></tr>
|
---|
| 94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object. <a href="#a970e0f401c7cfd7a78e78572f758eec4"></a><br/></td></tr>
|
---|
| 95 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaea7294b02abd22379cc3a9fccb754b7"></a><!-- doxytag: member="QuaZip::QuaZip" ref="aaea7294b02abd22379cc3a9fccb754b7" args="(const QString &zipName)" -->
|
---|
| 96 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#aaea7294b02abd22379cc3a9fccb754b7">QuaZip</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &zipName)</td></tr>
|
---|
| 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object associated with ZIP file <em>zipName</em>. <br/></td></tr>
|
---|
| 98 | <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#ae52ebadd5ce64cdb49d7e198904b0b8c">QuaZip</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>
|
---|
| 99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object associated with ZIP file represented by <em>ioDevice</em>. <a href="#ae52ebadd5ce64cdb49d7e198904b0b8c"></a><br/></td></tr>
|
---|
| 100 | <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#af60a2d3930b90f3b25a3148baecad81e">~QuaZip</a> ()</td></tr>
|
---|
| 101 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object. <a href="#af60a2d3930b90f3b25a3148baecad81e"></a><br/></td></tr>
|
---|
| 102 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962">open</a> (<a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">Mode</a> mode, zlib_filefunc_def *ioApi=NULL)</td></tr>
|
---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Opens ZIP file. <a href="#abfa4e6018b2964a3d10a4c54e5ab3962"></a><br/></td></tr>
|
---|
| 104 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f">close</a> ()</td></tr>
|
---|
| 105 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Closes ZIP file. <a href="#a7a4323b73e12f3b4470109f200728f9f"></a><br/></td></tr>
|
---|
| 106 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a339010b5566704ba3c9cafbfe848d8fb">setFileNameCodec</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> *fileNameCodec)</td></tr>
|
---|
| 107 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the codec used to encode/decode file names inside archive. <a href="#a339010b5566704ba3c9cafbfe848d8fb"></a><br/></td></tr>
|
---|
| 108 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a8f283519a195aa1d9076bbbb01ea0497">setFileNameCodec</a> (const char *fileNameCodecName)</td></tr>
|
---|
| 109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the codec used to encode/decode file names inside archive. <a href="#a8f283519a195aa1d9076bbbb01ea0497"></a><br/></td></tr>
|
---|
| 110 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27b866aa2c75ea6f9c438cbb6e32b43c"></a><!-- doxytag: member="QuaZip::getFileNameCodec" ref="a27b866aa2c75ea6f9c438cbb6e32b43c" args="() const " -->
|
---|
| 111 | <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a27b866aa2c75ea6f9c438cbb6e32b43c">getFileNameCodec</a> () const </td></tr>
|
---|
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the codec used to encode/decode comments inside archive. <br/></td></tr>
|
---|
| 113 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a1c81fca7215a4374f6f03872ade4885b">setCommentCodec</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> *commentCodec)</td></tr>
|
---|
| 114 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the codec used to encode/decode comments inside archive. <a href="#a1c81fca7215a4374f6f03872ade4885b"></a><br/></td></tr>
|
---|
| 115 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a413f3c56b54a9a47258d53802cb606e7">setCommentCodec</a> (const char *commentCodecName)</td></tr>
|
---|
| 116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the codec used to encode/decode comments inside archive. <a href="#a413f3c56b54a9a47258d53802cb606e7"></a><br/></td></tr>
|
---|
| 117 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a008260161781d8b5d2a0a28493fddaf4"></a><!-- doxytag: member="QuaZip::getCommentCodec" ref="a008260161781d8b5d2a0a28493fddaf4" args="() const " -->
|
---|
| 118 | <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a008260161781d8b5d2a0a28493fddaf4">getCommentCodec</a> () const </td></tr>
|
---|
| 119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the codec used to encode/decode comments inside archive. <br/></td></tr>
|
---|
| 120 | <tr><td class="memItemLeft" align="right" valign="top"><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="classQuaZip.html#a4f7deef08ff40aeb1a7a04bcd7f228c2">getZipName</a> () const </td></tr>
|
---|
| 121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of the ZIP file. <a href="#a4f7deef08ff40aeb1a7a04bcd7f228c2"></a><br/></td></tr>
|
---|
| 122 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#aa80b661de1262af905d1677dbcb008cc">setZipName</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &zipName)</td></tr>
|
---|
| 123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the name of the ZIP file. <a href="#aa80b661de1262af905d1677dbcb008cc"></a><br/></td></tr>
|
---|
| 124 | <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#afd3ba12fe68748acbf8b7cc14a5a1c29">getIoDevice</a> () const </td></tr>
|
---|
| 125 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the device representing this ZIP file. <a href="#afd3ba12fe68748acbf8b7cc14a5a1c29"></a><br/></td></tr>
|
---|
| 126 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6">setIoDevice</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>
|
---|
| 127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the device representing the ZIP file. <a href="#a64642948b6531ee54f5522f29e388cc6"></a><br/></td></tr>
|
---|
| 128 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a129ceff04d28fb00531f7bf7f9329664"></a><!-- doxytag: member="QuaZip::getMode" ref="a129ceff04d28fb00531f7bf7f9329664" args="() const " -->
|
---|
| 129 | <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">Mode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a129ceff04d28fb00531f7bf7f9329664">getMode</a> () const </td></tr>
|
---|
| 130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the mode in which ZIP file was opened. <br/></td></tr>
|
---|
| 131 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b869a9c0d4f49955b759592fec08888"></a><!-- doxytag: member="QuaZip::isOpen" ref="a5b869a9c0d4f49955b759592fec08888" args="() const " -->
|
---|
| 132 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen</a> () const </td></tr>
|
---|
| 133 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>true</code> if ZIP file is open, <code>false</code> otherwise. <br/></td></tr>
|
---|
| 134 | <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4">getZipError</a> () const </td></tr>
|
---|
| 135 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the error code of the last operation. <a href="#a28b91a6282ddd9382c96a069572c6fb4"></a><br/></td></tr>
|
---|
| 136 | <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a2ea4bd1fca948637c35c2d2752bb5a80">getEntriesCount</a> () const </td></tr>
|
---|
| 137 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns number of the entries in the ZIP central directory. <a href="#a2ea4bd1fca948637c35c2d2752bb5a80"></a><br/></td></tr>
|
---|
| 138 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae55cfbf2296132df808c557b62433051"></a><!-- doxytag: member="QuaZip::getComment" ref="ae55cfbf2296132df808c557b62433051" args="() const " -->
|
---|
| 139 | <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="classQuaZip.html#ae55cfbf2296132df808c557b62433051">getComment</a> () const </td></tr>
|
---|
| 140 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns global comment in the ZIP file. <br/></td></tr>
|
---|
| 141 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a1b5d936a203859340574d5908ffa2222">setComment</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> &comment)</td></tr>
|
---|
| 142 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the global comment in the ZIP file. <a href="#a1b5d936a203859340574d5908ffa2222"></a><br/></td></tr>
|
---|
| 143 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a745488f9177bcec3cdb858587584e033">goToFirstFile</a> ()</td></tr>
|
---|
| 144 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the current file to the first file in the archive. <a href="#a745488f9177bcec3cdb858587584e033"></a><br/></td></tr>
|
---|
| 145 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#aee6779b6cd338420c2e8c5655fa8ba97">goToNextFile</a> ()</td></tr>
|
---|
| 146 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the current file to the next file in the archive. <a href="#aee6779b6cd338420c2e8c5655fa8ba97"></a><br/></td></tr>
|
---|
| 147 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a6c657bfcfccb59d728e0da24c677d899">setCurrentFile</a> (const <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="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">CaseSensitivity</a> cs=csDefault)</td></tr>
|
---|
| 148 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets current file by its name. <a href="#a6c657bfcfccb59d728e0da24c677d899"></a><br/></td></tr>
|
---|
| 149 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00b237d926648f45da86db25e7cfb697"></a><!-- doxytag: member="QuaZip::hasCurrentFile" ref="a00b237d926648f45da86db25e7cfb697" args="() const " -->
|
---|
| 150 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a00b237d926648f45da86db25e7cfb697">hasCurrentFile</a> () const </td></tr>
|
---|
| 151 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>true</code> if the current file has been set. <br/></td></tr>
|
---|
| 152 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a9c91a53ed4c2038e153c64bdc097ebe8">getCurrentFileInfo</a> (<a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> *info) const </td></tr>
|
---|
| 153 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves information about the current file. <a href="#a9c91a53ed4c2038e153c64bdc097ebe8"></a><br/></td></tr>
|
---|
| 154 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a7ba6daf39263c308c683e7f72f74e0ae">getCurrentFileInfo</a> (<a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> *info) const </td></tr>
|
---|
| 155 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves information about the current file. <a href="#a7ba6daf39263c308c683e7f72f74e0ae"></a><br/></td></tr>
|
---|
| 156 | <tr><td class="memItemLeft" align="right" valign="top"><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="classQuaZip.html#a9783f8b4f39cd55e71e975aea78fd54a">getCurrentFileName</a> () const </td></tr>
|
---|
| 157 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the current file name. <a href="#a9783f8b4f39cd55e71e975aea78fd54a"></a><br/></td></tr>
|
---|
| 158 | <tr><td class="memItemLeft" align="right" valign="top">unzFile </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a3b78a652f296ff4a678a791e8294e642">getUnzFile</a> ()</td></tr>
|
---|
| 159 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>unzFile</code> handle. <a href="#a3b78a652f296ff4a678a791e8294e642"></a><br/></td></tr>
|
---|
| 160 | <tr><td class="memItemLeft" align="right" valign="top">zipFile </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a425043a4d7cc31e2fe2bba73d954f15c">getZipFile</a> ()</td></tr>
|
---|
| 161 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>zipFile</code> handle. <a href="#a425043a4d7cc31e2fe2bba73d954f15c"></a><br/></td></tr>
|
---|
| 162 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a6c23a12af88f7ea5edd4f9c0a24b9453">setDataDescriptorWritingEnabled</a> (bool enabled)</td></tr>
|
---|
| 163 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Changes the data descriptor writing mode. <a href="#a6c23a12af88f7ea5edd4f9c0a24b9453"></a><br/></td></tr>
|
---|
| 164 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#ae5c665a59447c2d30e63e9c6df48ebb7">isDataDescriptorWritingEnabled</a> () const </td></tr>
|
---|
| 165 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the data descriptor default writing mode. <a href="#ae5c665a59447c2d30e63e9c6df48ebb7"></a><br/></td></tr>
|
---|
| 166 | <tr><td class="memItemLeft" align="right" valign="top"><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="classQuaZip.html#abb38d8b4c9c4ae0728b48caae9dd82de">getFileNameList</a> () const </td></tr>
|
---|
| 167 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of files inside the archive. <a href="#abb38d8b4c9c4ae0728b48caae9dd82de"></a><br/></td></tr>
|
---|
| 168 | <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qlist.html">QList</a>< <a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a7486af66bede8e131db0cd2e81881387">getFileInfoList</a> () const </td></tr>
|
---|
| 169 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns information list about all files inside the archive. <a href="#a7486af66bede8e131db0cd2e81881387"></a><br/></td></tr>
|
---|
| 170 | <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qlist.html">QList</a>< <a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a474e66b1b696a9e00edcc067484c36ad">getFileInfoList64</a> () const </td></tr>
|
---|
| 171 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns information list about all files inside the archive. <a href="#a474e66b1b696a9e00edcc067484c36ad"></a><br/></td></tr>
|
---|
| 172 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#ab99a22efae02ebb4b5c9cd8eedc1c0b0">setZip64Enabled</a> (bool zip64)</td></tr>
|
---|
| 173 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Enables the zip64 mode. <a href="#ab99a22efae02ebb4b5c9cd8eedc1c0b0"></a><br/></td></tr>
|
---|
| 174 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a1b638566390d7599ba5982e844b151f4">isZip64Enabled</a> () const </td></tr>
|
---|
| 175 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the zip64 mode is enabled. <a href="#a1b638566390d7599ba5982e844b151f4"></a><br/></td></tr>
|
---|
| 176 | <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#adc2cc762ab5744720ae4d33290b5f5bf">isAutoClose</a> () const </td></tr>
|
---|
| 177 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the auto-close flag. <a href="#adc2cc762ab5744720ae4d33290b5f5bf"></a><br/></td></tr>
|
---|
| 178 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a54bfc924762774ccf9f99be075ba7b0e">setAutoClose</a> (bool autoClose) const </td></tr>
|
---|
| 179 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets or unsets the auto-close flag. <a href="#a54bfc924762774ccf9f99be075ba7b0e"></a><br/></td></tr>
|
---|
| 180 | <tr><td colspan="2"><h2><a name="pub-static-methods"></a>
|
---|
| 181 | Static Public Member Functions</h2></td></tr>
|
---|
| 182 | <tr><td class="memItemLeft" align="right" valign="top">static Qt::CaseSensitivity </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a1d3fbd445a8e9d3449ded7371931c6b3">convertCaseSensitivity</a> (<a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">CaseSensitivity</a> cs)</td></tr>
|
---|
| 183 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the actual case sensitivity for the specified QuaZIP one. <a href="#a1d3fbd445a8e9d3449ded7371931c6b3"></a><br/></td></tr>
|
---|
| 184 | <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a317f5db89d84a80417338a3ab89770da">setDefaultFileNameCodec</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> *codec)</td></tr>
|
---|
| 185 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the default file name codec to use. <a href="#a317f5db89d84a80417338a3ab89770da"></a><br/></td></tr>
|
---|
| 186 | <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a694af3c0ab076fab7bf619952f6fbfea">setDefaultFileNameCodec</a> (const char *codecName)</td></tr>
|
---|
| 187 | <tr><td colspan="2"><h2><a name="friends"></a>
|
---|
| 188 | Friends</h2></td></tr>
|
---|
| 189 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d400b33a69412e9d419a484aaf476cd"></a><!-- doxytag: member="QuaZip::QuaZipPrivate" ref="a5d400b33a69412e9d419a484aaf476cd" args="" -->
|
---|
| 190 | class </td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaZip.html#a5d400b33a69412e9d419a484aaf476cd">QuaZipPrivate</a></td></tr>
|
---|
| 191 | </table>
|
---|
| 192 | <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
---|
| 193 | <div class="textblock"><p>ZIP archive. </p>
|
---|
| 194 | <p>This class implements basic interface to the ZIP archive. It can be used to read table contents of the ZIP archive and retreiving information about the files inside it.</p>
|
---|
| 195 | <p>You can also use this class to open files inside archive by passing pointer to the instance of this class to the constructor of the <a class="el" href="classQuaZipFile.html" title="A file inside ZIP archive.">QuaZipFile</a> class. But see <a class="el" href="classQuaZipFile.html#a54e944a6b3d27030f64c8f30d2cc33bb" title="Constructs a QuaZipFile instance.">QuaZipFile::QuaZipFile(QuaZip*, QObject*)</a> for the possible pitfalls.</p>
|
---|
| 196 | <p>This class is indended to provide interface to the ZIP subpackage of the ZIP/UNZIP package as well as to the UNZIP subpackage. But currently it supports only UNZIP.</p>
|
---|
| 197 | <p>The use of this class is simple - just create instance using constructor, then set ZIP archive file name using setFile() function (if you did not passed the name to the constructor), then <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> and then use different functions to work with it! Well, if you are paranoid, you may also wish to call close before destructing the instance, to check for errors on close.</p>
|
---|
| 198 | <p>You may also use <a class="el" href="classQuaZip.html#a3b78a652f296ff4a678a791e8294e642" title="Returns unzFile handle.">getUnzFile()</a> and <a class="el" href="classQuaZip.html#a425043a4d7cc31e2fe2bba73d954f15c" title="Returns zipFile handle.">getZipFile()</a> functions to get the ZIP archive handle and use it with ZIP/UNZIP package API directly.</p>
|
---|
| 199 | <p>This class supports localized file names inside ZIP archive, but you have to set up proper codec with setCodec() function. By default, locale codec will be used, which is probably ok for UNIX systems, but will almost certainly fail with ZIP archives created in Windows. This is because Windows ZIP programs have strange habit of using DOS encoding for file names in ZIP archives. For example, ZIP archive with cyrillic names created in Windows will have file names in <code>IBM866</code> encoding instead of <code>WINDOWS-1251</code>. I think that calling one function is not much trouble, but for true platform independency it would be nice to have some mechanism for file name encoding auto detection using locale information. Does anyone know a good way to do it? </p>
|
---|
| 200 | </div><hr/><h2>Member Enumeration Documentation</h2>
|
---|
| 201 | <a class="anchor" id="adce46b942c341dbb5c851eadead65459"></a><!-- doxytag: member="QuaZip::Constants" ref="adce46b942c341dbb5c851eadead65459" args="" -->
|
---|
| 202 | <div class="memitem">
|
---|
| 203 | <div class="memproto">
|
---|
| 204 | <table class="memname">
|
---|
| 205 | <tr>
|
---|
| 206 | <td class="memname">enum <a class="el" href="classQuaZip.html#adce46b942c341dbb5c851eadead65459">QuaZip::Constants</a></td>
|
---|
| 207 | </tr>
|
---|
| 208 | </table>
|
---|
| 209 | </div>
|
---|
| 210 | <div class="memdoc">
|
---|
| 211 |
|
---|
| 212 | <p>Useful constants. </p>
|
---|
| 213 | <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
|
---|
| 214 | <tr><td valign="top"><em><a class="anchor" id="adce46b942c341dbb5c851eadead65459ab26ce1a9c9e94f901dc2cf90fa5baa4b"></a><!-- doxytag: member="MAX_FILE_NAME_LENGTH" ref="adce46b942c341dbb5c851eadead65459ab26ce1a9c9e94f901dc2cf90fa5baa4b" args="" -->MAX_FILE_NAME_LENGTH</em> </td><td>
|
---|
| 215 | <p>Maximum file name length. Taken from <code>UNZ_MAXFILENAMEINZIP</code> constant in unzip.c. </p>
|
---|
| 216 | </td></tr>
|
---|
| 217 | </table>
|
---|
| 218 | </dd>
|
---|
| 219 | </dl>
|
---|
| 220 |
|
---|
| 221 | </div>
|
---|
| 222 | </div>
|
---|
| 223 | <a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4"></a><!-- doxytag: member="QuaZip::Mode" ref="a47e28d4116ee716fdd6b431b821d0be4" args="" -->
|
---|
| 224 | <div class="memitem">
|
---|
| 225 | <div class="memproto">
|
---|
| 226 | <table class="memname">
|
---|
| 227 | <tr>
|
---|
| 228 | <td class="memname">enum <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">QuaZip::Mode</a></td>
|
---|
| 229 | </tr>
|
---|
| 230 | </table>
|
---|
| 231 | </div>
|
---|
| 232 | <div class="memdoc">
|
---|
| 233 |
|
---|
| 234 | <p>Open mode of the ZIP file. </p>
|
---|
| 235 | <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
|
---|
| 236 | <tr><td valign="top"><em><a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4ac87ddb1e901e1ec700c16ee0d4d398ce"></a><!-- doxytag: member="mdNotOpen" ref="a47e28d4116ee716fdd6b431b821d0be4ac87ddb1e901e1ec700c16ee0d4d398ce" args="" -->mdNotOpen</em> </td><td>
|
---|
| 237 | <p>ZIP file is not open. This is the initial mode. </p>
|
---|
| 238 | </td></tr>
|
---|
| 239 | <tr><td valign="top"><em><a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897"></a><!-- doxytag: member="mdUnzip" ref="a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897" args="" -->mdUnzip</em> </td><td>
|
---|
| 240 | <p>ZIP file is open for reading files inside it. </p>
|
---|
| 241 | </td></tr>
|
---|
| 242 | <tr><td valign="top"><em><a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e"></a><!-- doxytag: member="mdCreate" ref="a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e" args="" -->mdCreate</em> </td><td>
|
---|
| 243 | <p>ZIP file was created with <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> call. </p>
|
---|
| 244 | </td></tr>
|
---|
| 245 | <tr><td valign="top"><em><a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4ab807f0c65653a16d77b365801fd25582"></a><!-- doxytag: member="mdAppend" ref="a47e28d4116ee716fdd6b431b821d0be4ab807f0c65653a16d77b365801fd25582" args="" -->mdAppend</em> </td><td>
|
---|
| 246 | <p>ZIP file was opened in append mode. This refers to <code>APPEND_STATUS_CREATEAFTER</code> mode in ZIP/UNZIP package and means that zip is appended to some existing file what is useful when that file contains self-extractor code. This is obviously <em>not</em> what you whant to use to add files to the existing ZIP archive. </p>
|
---|
| 247 | </td></tr>
|
---|
| 248 | <tr><td valign="top"><em><a class="anchor" id="a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec"></a><!-- doxytag: member="mdAdd" ref="a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec" args="" -->mdAdd</em> </td><td>
|
---|
| 249 | <p>ZIP file was opened for adding files in the archive. </p>
|
---|
| 250 | </td></tr>
|
---|
| 251 | </table>
|
---|
| 252 | </dd>
|
---|
| 253 | </dl>
|
---|
| 254 |
|
---|
| 255 | </div>
|
---|
| 256 | </div>
|
---|
| 257 | <a class="anchor" id="a6053a1d249ed210a85c9d5eb7cf9cdbe"></a><!-- doxytag: member="QuaZip::CaseSensitivity" ref="a6053a1d249ed210a85c9d5eb7cf9cdbe" args="" -->
|
---|
| 258 | <div class="memitem">
|
---|
| 259 | <div class="memproto">
|
---|
| 260 | <table class="memname">
|
---|
| 261 | <tr>
|
---|
| 262 | <td class="memname">enum <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">QuaZip::CaseSensitivity</a></td>
|
---|
| 263 | </tr>
|
---|
| 264 | </table>
|
---|
| 265 | </div>
|
---|
| 266 | <div class="memdoc">
|
---|
| 267 |
|
---|
| 268 | <p>Case sensitivity for the file names. </p>
|
---|
| 269 | <p>This is what you specify when accessing files in the archive. Works perfectly fine with any characters thanks to Qt's great unicode support. This is different from ZIP/UNZIP API, where only US-ASCII characters was supported. </p>
|
---|
| 270 | <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
|
---|
| 271 | <tr><td valign="top"><em><a class="anchor" id="a6053a1d249ed210a85c9d5eb7cf9cdbeac3cca8c0b976cf6397a28a5c84e75253"></a><!-- doxytag: member="csDefault" ref="a6053a1d249ed210a85c9d5eb7cf9cdbeac3cca8c0b976cf6397a28a5c84e75253" args="" -->csDefault</em> </td><td>
|
---|
| 272 | <p>Default for platform. Case sensitive for UNIX, not for Windows. </p>
|
---|
| 273 | </td></tr>
|
---|
| 274 | <tr><td valign="top"><em><a class="anchor" id="a6053a1d249ed210a85c9d5eb7cf9cdbead8d86b0c34203336cad09348cfa5356e"></a><!-- doxytag: member="csSensitive" ref="a6053a1d249ed210a85c9d5eb7cf9cdbead8d86b0c34203336cad09348cfa5356e" args="" -->csSensitive</em> </td><td>
|
---|
| 275 | <p>Case sensitive. </p>
|
---|
| 276 | </td></tr>
|
---|
| 277 | <tr><td valign="top"><em><a class="anchor" id="a6053a1d249ed210a85c9d5eb7cf9cdbea3e492bcc3f64f41a74906cecc45fb366"></a><!-- doxytag: member="csInsensitive" ref="a6053a1d249ed210a85c9d5eb7cf9cdbea3e492bcc3f64f41a74906cecc45fb366" args="" -->csInsensitive</em> </td><td>
|
---|
| 278 | <p>Case insensitive. </p>
|
---|
| 279 | </td></tr>
|
---|
| 280 | </table>
|
---|
| 281 | </dd>
|
---|
| 282 | </dl>
|
---|
| 283 |
|
---|
| 284 | </div>
|
---|
| 285 | </div>
|
---|
| 286 | <hr/><h2>Constructor & Destructor Documentation</h2>
|
---|
| 287 | <a class="anchor" id="a970e0f401c7cfd7a78e78572f758eec4"></a><!-- doxytag: member="QuaZip::QuaZip" ref="a970e0f401c7cfd7a78e78572f758eec4" args="()" -->
|
---|
| 288 | <div class="memitem">
|
---|
| 289 | <div class="memproto">
|
---|
| 290 | <table class="memname">
|
---|
| 291 | <tr>
|
---|
| 292 | <td class="memname">QuaZip::QuaZip </td>
|
---|
| 293 | <td>(</td>
|
---|
| 294 | <td class="paramname"></td><td>)</td>
|
---|
| 295 | <td></td>
|
---|
| 296 | </tr>
|
---|
| 297 | </table>
|
---|
| 298 | </div>
|
---|
| 299 | <div class="memdoc">
|
---|
| 300 |
|
---|
| 301 | <p>Constructs <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object. </p>
|
---|
| 302 | <p>Call setName() before opening constructed object. </p>
|
---|
| 303 |
|
---|
| 304 | </div>
|
---|
| 305 | </div>
|
---|
| 306 | <a class="anchor" id="ae52ebadd5ce64cdb49d7e198904b0b8c"></a><!-- doxytag: member="QuaZip::QuaZip" ref="ae52ebadd5ce64cdb49d7e198904b0b8c" args="(QIODevice *ioDevice)" -->
|
---|
| 307 | <div class="memitem">
|
---|
| 308 | <div class="memproto">
|
---|
| 309 | <table class="memname">
|
---|
| 310 | <tr>
|
---|
| 311 | <td class="memname">QuaZip::QuaZip </td>
|
---|
| 312 | <td>(</td>
|
---|
| 313 | <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>
|
---|
| 314 | <td class="paramname"><em>ioDevice</em></td><td>)</td>
|
---|
| 315 | <td></td>
|
---|
| 316 | </tr>
|
---|
| 317 | </table>
|
---|
| 318 | </div>
|
---|
| 319 | <div class="memdoc">
|
---|
| 320 |
|
---|
| 321 | <p>Constructs <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object associated with ZIP file represented by <em>ioDevice</em>. </p>
|
---|
| 322 | <p>The IO device must be seekable, otherwise an error will occur when opening. </p>
|
---|
| 323 |
|
---|
| 324 | </div>
|
---|
| 325 | </div>
|
---|
| 326 | <a class="anchor" id="af60a2d3930b90f3b25a3148baecad81e"></a><!-- doxytag: member="QuaZip::~QuaZip" ref="af60a2d3930b90f3b25a3148baecad81e" args="()" -->
|
---|
| 327 | <div class="memitem">
|
---|
| 328 | <div class="memproto">
|
---|
| 329 | <table class="memname">
|
---|
| 330 | <tr>
|
---|
| 331 | <td class="memname">QuaZip::~QuaZip </td>
|
---|
| 332 | <td>(</td>
|
---|
| 333 | <td class="paramname"></td><td>)</td>
|
---|
| 334 | <td></td>
|
---|
| 335 | </tr>
|
---|
| 336 | </table>
|
---|
| 337 | </div>
|
---|
| 338 | <div class="memdoc">
|
---|
| 339 |
|
---|
| 340 | <p>Destroys <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> object. </p>
|
---|
| 341 | <p>Calls <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f" title="Closes ZIP file.">close()</a> if necessary. </p>
|
---|
| 342 |
|
---|
| 343 | <p>References <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f">close()</a>, and <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>.</p>
|
---|
| 344 |
|
---|
| 345 | </div>
|
---|
| 346 | </div>
|
---|
| 347 | <hr/><h2>Member Function Documentation</h2>
|
---|
| 348 | <a class="anchor" id="a1d3fbd445a8e9d3449ded7371931c6b3"></a><!-- doxytag: member="QuaZip::convertCaseSensitivity" ref="a1d3fbd445a8e9d3449ded7371931c6b3" args="(CaseSensitivity cs)" -->
|
---|
| 349 | <div class="memitem">
|
---|
| 350 | <div class="memproto">
|
---|
| 351 | <table class="memname">
|
---|
| 352 | <tr>
|
---|
| 353 | <td class="memname">Qt::CaseSensitivity QuaZip::convertCaseSensitivity </td>
|
---|
| 354 | <td>(</td>
|
---|
| 355 | <td class="paramtype"><a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">QuaZip::CaseSensitivity</a> </td>
|
---|
| 356 | <td class="paramname"><em>cs</em></td><td>)</td>
|
---|
| 357 | <td><code> [static]</code></td>
|
---|
| 358 | </tr>
|
---|
| 359 | </table>
|
---|
| 360 | </div>
|
---|
| 361 | <div class="memdoc">
|
---|
| 362 |
|
---|
| 363 | <p>Returns the actual case sensitivity for the specified QuaZIP one. </p>
|
---|
| 364 | <dl><dt><b>Parameters:</b></dt><dd>
|
---|
| 365 | <table class="params">
|
---|
| 366 | <tr><td class="paramname">cs</td><td>The value to convert. </td></tr>
|
---|
| 367 | </table>
|
---|
| 368 | </dd>
|
---|
| 369 | </dl>
|
---|
| 370 | <dl class="return"><dt><b>Returns:</b></dt><dd>If CaseSensitivity::csDefault, then returns the default file name case sensitivity for the platform. Otherwise, just returns the appropriate value from the Qt::CaseSensitivity enum. </dd></dl>
|
---|
| 371 |
|
---|
| 372 | <p>References <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbeac3cca8c0b976cf6397a28a5c84e75253">csDefault</a>, and <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbead8d86b0c34203336cad09348cfa5356e">csSensitive</a>.</p>
|
---|
| 373 |
|
---|
| 374 | <p>Referenced by <a class="el" href="classQuaZipDir.html#aacb488fec6e951ac80e5d473534fee97">QuaZipDir::exists()</a>, and <a class="el" href="classQuaZip.html#a6c657bfcfccb59d728e0da24c677d899">setCurrentFile()</a>.</p>
|
---|
| 375 |
|
---|
| 376 | </div>
|
---|
| 377 | </div>
|
---|
| 378 | <a class="anchor" id="abfa4e6018b2964a3d10a4c54e5ab3962"></a><!-- doxytag: member="QuaZip::open" ref="abfa4e6018b2964a3d10a4c54e5ab3962" args="(Mode mode, zlib_filefunc_def *ioApi=NULL)" -->
|
---|
| 379 | <div class="memitem">
|
---|
| 380 | <div class="memproto">
|
---|
| 381 | <table class="memname">
|
---|
| 382 | <tr>
|
---|
| 383 | <td class="memname">bool QuaZip::open </td>
|
---|
| 384 | <td>(</td>
|
---|
| 385 | <td class="paramtype"><a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4">Mode</a> </td>
|
---|
| 386 | <td class="paramname"><em>mode</em>, </td>
|
---|
| 387 | </tr>
|
---|
| 388 | <tr>
|
---|
| 389 | <td class="paramkey"></td>
|
---|
| 390 | <td></td>
|
---|
| 391 | <td class="paramtype">zlib_filefunc_def * </td>
|
---|
| 392 | <td class="paramname"><em>ioApi</em> = <code>NULL</code> </td>
|
---|
| 393 | </tr>
|
---|
| 394 | <tr>
|
---|
| 395 | <td></td>
|
---|
| 396 | <td>)</td>
|
---|
| 397 | <td></td><td></td>
|
---|
| 398 | </tr>
|
---|
| 399 | </table>
|
---|
| 400 | </div>
|
---|
| 401 | <div class="memdoc">
|
---|
| 402 |
|
---|
| 403 | <p>Opens ZIP file. </p>
|
---|
| 404 | <p>Argument <em>mode</em> specifies open mode of the ZIP archive. See Mode for details. Note that there is zipOpen2() function in the ZIP/UNZIP API which accepts <em>globalcomment</em> argument, but it does not use it anywhere, so this <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> function does not have this argument. See <a class="el" href="classQuaZip.html#a1b5d936a203859340574d5908ffa2222" title="Sets the global comment in the ZIP file.">setComment()</a> if you need to set global comment.</p>
|
---|
| 405 | <p>If the ZIP file is accessed via explicitly set <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a>, then this device is opened in the necessary mode. If the device was already opened by some other means, then QuaZIP checks if the open mode is compatible to the mode needed for the requested operation. If necessary, seeking is performed to position the device properly.</p>
|
---|
| 406 | <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if successful, <code>false</code> otherwise.</dd></dl>
|
---|
| 407 | <dl class="note"><dt><b>Note:</b></dt><dd>ZIP/UNZIP API open calls do not return error code - they just return <code>NULL</code> indicating an error. But to make things easier, <a class="el" href="quazip_8h_source.html">quazip.h</a> header defines additional error code <code>UNZ_ERROROPEN</code> and <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> will return it if the open call of the ZIP/UNZIP API returns <code>NULL</code>.</dd></dl>
|
---|
| 408 | <p>Argument <em>ioApi</em> specifies IO function set for ZIP/UNZIP package to use. See unzip.h, zip.h and ioapi.h for details. Note that IO API for <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> is different from the original package. The file path argument was changed to be of type <code>voidpf</code>, and <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> passes a <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> pointer there. This <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> is either set explicitly via <a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a> or the <a class="el" href="classQuaZip.html#ae52ebadd5ce64cdb49d7e198904b0b8c" title="Constructs QuaZip object associated with ZIP file represented by ioDevice.">QuaZip(QIODevice*)</a> constructor, or it is created internally when opening the archive by its file name. The default API (qioapi.cpp) just delegates everything to the <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> API. Not only this allows to use a <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> instead of file name, but also has a nice side effect of raising the file size limit from 2G to 4G (in non-zip64 archives).</p>
|
---|
| 409 | <dl class="note"><dt><b>Note:</b></dt><dd>If the zip64 support is needed, the ioApi argument <em>must</em> be NULL because due to the backwards compatibility issues it can be used to provide a 32-bit API only.</dd>
|
---|
| 410 | <dd>
|
---|
| 411 | If the <a class="el" href="classQuaZip.html#a54bfc924762774ccf9f99be075ba7b0e">no-auto-close</a> feature is used, then the <em>ioApi</em> argument <em>should</em> be NULL because the old API doesn't support the 'fake close' operation, causing slight memory leaks and other possible troubles (like closing the output device in case when an error occurs during opening).</dd></dl>
|
---|
| 412 | <p>In short: just forget about the <em>ioApi</em> argument and you'll be fine. </p>
|
---|
| 413 |
|
---|
| 414 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isEmpty">QString::isEmpty()</a>, <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html#isSequential">QIODevice::isSequential()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec">mdAdd</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4ab807f0c65653a16d77b365801fd25582">mdAppend</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">mdCreate</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>, and <a class="el" href="classQuaZipPrivate.html#ab83497156892d07e6a1514cef149a1e2">QuaZipPrivate::zipFile_f</a>.</p>
|
---|
| 415 |
|
---|
| 416 | <p>Referenced by <a class="el" href="classJlCompress.html#ada7511686a24c014e9db25735be148a7">JlCompress::compressDir()</a>, <a class="el" href="classJlCompress.html#a4a4de9c62ecf161bb658d4d80495ea97">JlCompress::compressFile()</a>, <a class="el" href="classJlCompress.html#a9cdb92d29a94c6b13a718a3249685846">JlCompress::compressFiles()</a>, and <a class="el" href="classQuaZipFile.html#aed75bace51f2bb4c3e4f656ab4493aac">QuaZipFile::open()</a>.</p>
|
---|
| 417 |
|
---|
| 418 | </div>
|
---|
| 419 | </div>
|
---|
| 420 | <a class="anchor" id="a7a4323b73e12f3b4470109f200728f9f"></a><!-- doxytag: member="QuaZip::close" ref="a7a4323b73e12f3b4470109f200728f9f" args="()" -->
|
---|
| 421 | <div class="memitem">
|
---|
| 422 | <div class="memproto">
|
---|
| 423 | <table class="memname">
|
---|
| 424 | <tr>
|
---|
| 425 | <td class="memname">void QuaZip::close </td>
|
---|
| 426 | <td>(</td>
|
---|
| 427 | <td class="paramname"></td><td>)</td>
|
---|
| 428 | <td></td>
|
---|
| 429 | </tr>
|
---|
| 430 | </table>
|
---|
| 431 | </div>
|
---|
| 432 | <div class="memdoc">
|
---|
| 433 |
|
---|
| 434 | <p>Closes ZIP file. </p>
|
---|
| 435 | <p>Call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> to determine if the close was successful.</p>
|
---|
| 436 | <p>If the file was opened by name, then the underlying <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> is closed and deleted.</p>
|
---|
| 437 | <p>If the underlying <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> was set explicitly using <a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a> or the appropriate constructor, then it is closed if the auto-close flag is set (which it is by default). Call <a class="el" href="classQuaZip.html#a54bfc924762774ccf9f99be075ba7b0e" title="Sets or unsets the auto-close flag.">setAutoClose()</a> to clear the auto-close flag if this behavior is undesirable.</p>
|
---|
| 438 | <p>Since <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qt.html">Qt</a> 5.1, the <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qsavefile.html">QSaveFile</a> was introduced. It breaks the <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> API by making <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f" title="Closes ZIP file.">close()</a> private and crashing the application if it is called from the base class where it is public. It is an excellent example of poor design that illustrates why you should never ever break an is-a relationship between the base class and a subclass. QuaZIP works around this bug by checking if the <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> is an instance of <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qsavefile.html">QSaveFile</a>, using qobject_cast<>, and if it is, calls <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qsavefile.html#commit">QSaveFile::commit()</a> instead of <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f" title="Closes ZIP file.">close()</a>. It is a really ugly hack, but at least it makes your programs work instead of crashing. Note that if the auto-close flag is cleared, then this is a non-issue, and commit() isn't called. </p>
|
---|
| 439 |
|
---|
| 440 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#constData">QByteArray::constData()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#fromUnicode">QTextCodec::fromUnicode()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isEmpty">QString::isEmpty()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isNull">QString::isNull()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec">mdAdd</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4ab807f0c65653a16d77b365801fd25582">mdAppend</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a25ae05b12590540af8c66ae8298b928e">mdCreate</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4ac87ddb1e901e1ec700c16ee0d4d398ce">mdNotOpen</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>, and <a class="el" href="classQuaZipPrivate.html#ab83497156892d07e6a1514cef149a1e2">QuaZipPrivate::zipFile_f</a>.</p>
|
---|
| 441 |
|
---|
| 442 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a42a39b12619bccd3d419ee60bbb3fcf6">QuaZipFile::close()</a>, <a class="el" href="classJlCompress.html#ada7511686a24c014e9db25735be148a7">JlCompress::compressDir()</a>, <a class="el" href="classJlCompress.html#a4a4de9c62ecf161bb658d4d80495ea97">JlCompress::compressFile()</a>, <a class="el" href="classJlCompress.html#a9cdb92d29a94c6b13a718a3249685846">JlCompress::compressFiles()</a>, <a class="el" href="classQuaZipFile.html#aed75bace51f2bb4c3e4f656ab4493aac">QuaZipFile::open()</a>, and <a class="el" href="classQuaZip.html#af60a2d3930b90f3b25a3148baecad81e">~QuaZip()</a>.</p>
|
---|
| 443 |
|
---|
| 444 | </div>
|
---|
| 445 | </div>
|
---|
| 446 | <a class="anchor" id="a339010b5566704ba3c9cafbfe848d8fb"></a><!-- doxytag: member="QuaZip::setFileNameCodec" ref="a339010b5566704ba3c9cafbfe848d8fb" args="(QTextCodec *fileNameCodec)" -->
|
---|
| 447 | <div class="memitem">
|
---|
| 448 | <div class="memproto">
|
---|
| 449 | <table class="memname">
|
---|
| 450 | <tr>
|
---|
| 451 | <td class="memname">void QuaZip::setFileNameCodec </td>
|
---|
| 452 | <td>(</td>
|
---|
| 453 | <td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> * </td>
|
---|
| 454 | <td class="paramname"><em>fileNameCodec</em></td><td>)</td>
|
---|
| 455 | <td></td>
|
---|
| 456 | </tr>
|
---|
| 457 | </table>
|
---|
| 458 | </div>
|
---|
| 459 | <div class="memdoc">
|
---|
| 460 |
|
---|
| 461 | <p>Sets the codec used to encode/decode file names inside archive. </p>
|
---|
| 462 | <p>This is necessary to access files in the ZIP archive created under Windows with non-latin characters in file names. For example, file names with cyrillic letters will be in <code>IBM866</code> encoding. </p>
|
---|
| 463 |
|
---|
| 464 | </div>
|
---|
| 465 | </div>
|
---|
| 466 | <a class="anchor" id="a8f283519a195aa1d9076bbbb01ea0497"></a><!-- doxytag: member="QuaZip::setFileNameCodec" ref="a8f283519a195aa1d9076bbbb01ea0497" args="(const char *fileNameCodecName)" -->
|
---|
| 467 | <div class="memitem">
|
---|
| 468 | <div class="memproto">
|
---|
| 469 | <table class="memname">
|
---|
| 470 | <tr>
|
---|
| 471 | <td class="memname">void QuaZip::setFileNameCodec </td>
|
---|
| 472 | <td>(</td>
|
---|
| 473 | <td class="paramtype">const char * </td>
|
---|
| 474 | <td class="paramname"><em>fileNameCodecName</em></td><td>)</td>
|
---|
| 475 | <td></td>
|
---|
| 476 | </tr>
|
---|
| 477 | </table>
|
---|
| 478 | </div>
|
---|
| 479 | <div class="memdoc">
|
---|
| 480 |
|
---|
| 481 | <p>Sets the codec used to encode/decode file names inside archive. </p>
|
---|
| 482 | <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Equivalent to calling setFileNameCodec(QTextCodec::codecForName(codecName)); </p>
|
---|
| 483 |
|
---|
| 484 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#codecForName">QTextCodec::codecForName()</a>.</p>
|
---|
| 485 |
|
---|
| 486 | </div>
|
---|
| 487 | </div>
|
---|
| 488 | <a class="anchor" id="a1c81fca7215a4374f6f03872ade4885b"></a><!-- doxytag: member="QuaZip::setCommentCodec" ref="a1c81fca7215a4374f6f03872ade4885b" args="(QTextCodec *commentCodec)" -->
|
---|
| 489 | <div class="memitem">
|
---|
| 490 | <div class="memproto">
|
---|
| 491 | <table class="memname">
|
---|
| 492 | <tr>
|
---|
| 493 | <td class="memname">void QuaZip::setCommentCodec </td>
|
---|
| 494 | <td>(</td>
|
---|
| 495 | <td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> * </td>
|
---|
| 496 | <td class="paramname"><em>commentCodec</em></td><td>)</td>
|
---|
| 497 | <td></td>
|
---|
| 498 | </tr>
|
---|
| 499 | </table>
|
---|
| 500 | </div>
|
---|
| 501 | <div class="memdoc">
|
---|
| 502 |
|
---|
| 503 | <p>Sets the codec used to encode/decode comments inside archive. </p>
|
---|
| 504 | <p>This codec defaults to locale codec, which is probably ok. </p>
|
---|
| 505 |
|
---|
| 506 | </div>
|
---|
| 507 | </div>
|
---|
| 508 | <a class="anchor" id="a413f3c56b54a9a47258d53802cb606e7"></a><!-- doxytag: member="QuaZip::setCommentCodec" ref="a413f3c56b54a9a47258d53802cb606e7" args="(const char *commentCodecName)" -->
|
---|
| 509 | <div class="memitem">
|
---|
| 510 | <div class="memproto">
|
---|
| 511 | <table class="memname">
|
---|
| 512 | <tr>
|
---|
| 513 | <td class="memname">void QuaZip::setCommentCodec </td>
|
---|
| 514 | <td>(</td>
|
---|
| 515 | <td class="paramtype">const char * </td>
|
---|
| 516 | <td class="paramname"><em>commentCodecName</em></td><td>)</td>
|
---|
| 517 | <td></td>
|
---|
| 518 | </tr>
|
---|
| 519 | </table>
|
---|
| 520 | </div>
|
---|
| 521 | <div class="memdoc">
|
---|
| 522 |
|
---|
| 523 | <p>Sets the codec used to encode/decode comments inside archive. </p>
|
---|
| 524 | <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Equivalent to calling setCommentCodec(QTextCodec::codecForName(codecName)); </p>
|
---|
| 525 |
|
---|
| 526 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#codecForName">QTextCodec::codecForName()</a>.</p>
|
---|
| 527 |
|
---|
| 528 | </div>
|
---|
| 529 | </div>
|
---|
| 530 | <a class="anchor" id="a4f7deef08ff40aeb1a7a04bcd7f228c2"></a><!-- doxytag: member="QuaZip::getZipName" ref="a4f7deef08ff40aeb1a7a04bcd7f228c2" args="() const " -->
|
---|
| 531 | <div class="memitem">
|
---|
| 532 | <div class="memproto">
|
---|
| 533 | <table class="memname">
|
---|
| 534 | <tr>
|
---|
| 535 | <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> QuaZip::getZipName </td>
|
---|
| 536 | <td>(</td>
|
---|
| 537 | <td class="paramname"></td><td>)</td>
|
---|
| 538 | <td> const</td>
|
---|
| 539 | </tr>
|
---|
| 540 | </table>
|
---|
| 541 | </div>
|
---|
| 542 | <div class="memdoc">
|
---|
| 543 |
|
---|
| 544 | <p>Returns the name of the ZIP file. </p>
|
---|
| 545 | <p>Returns null string if no ZIP file name has been set, for example when the <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> instance is set up to use a <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> instead. </p>
|
---|
| 546 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#aa80b661de1262af905d1677dbcb008cc" title="Sets the name of the ZIP file.">setZipName()</a>, <a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a>, <a class="el" href="classQuaZip.html#afd3ba12fe68748acbf8b7cc14a5a1c29" title="Returns the device representing this ZIP file.">getIoDevice()</a> </dd></dl>
|
---|
| 547 |
|
---|
| 548 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a6f034a714aa94631367590de3f8f4e22">QuaZipFile::getZipName()</a>.</p>
|
---|
| 549 |
|
---|
| 550 | </div>
|
---|
| 551 | </div>
|
---|
| 552 | <a class="anchor" id="aa80b661de1262af905d1677dbcb008cc"></a><!-- doxytag: member="QuaZip::setZipName" ref="aa80b661de1262af905d1677dbcb008cc" args="(const QString &zipName)" -->
|
---|
| 553 | <div class="memitem">
|
---|
| 554 | <div class="memproto">
|
---|
| 555 | <table class="memname">
|
---|
| 556 | <tr>
|
---|
| 557 | <td class="memname">void QuaZip::setZipName </td>
|
---|
| 558 | <td>(</td>
|
---|
| 559 | <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> & </td>
|
---|
| 560 | <td class="paramname"><em>zipName</em></td><td>)</td>
|
---|
| 561 | <td></td>
|
---|
| 562 | </tr>
|
---|
| 563 | </table>
|
---|
| 564 | </div>
|
---|
| 565 | <div class="memdoc">
|
---|
| 566 |
|
---|
| 567 | <p>Sets the name of the ZIP file. </p>
|
---|
| 568 | <p>Does nothing if the ZIP file is open.</p>
|
---|
| 569 | <p>Does not reset error code returned by <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a>. </p>
|
---|
| 570 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a>, <a class="el" href="classQuaZip.html#afd3ba12fe68748acbf8b7cc14a5a1c29" title="Returns the device representing this ZIP file.">getIoDevice()</a>, <a class="el" href="classQuaZip.html#a4f7deef08ff40aeb1a7a04bcd7f228c2" title="Returns the name of the ZIP file.">getZipName()</a> </dd></dl>
|
---|
| 571 |
|
---|
| 572 | <p>References <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>.</p>
|
---|
| 573 |
|
---|
| 574 | </div>
|
---|
| 575 | </div>
|
---|
| 576 | <a class="anchor" id="afd3ba12fe68748acbf8b7cc14a5a1c29"></a><!-- doxytag: member="QuaZip::getIoDevice" ref="afd3ba12fe68748acbf8b7cc14a5a1c29" args="() const " -->
|
---|
| 577 | <div class="memitem">
|
---|
| 578 | <div class="memproto">
|
---|
| 579 | <table class="memname">
|
---|
| 580 | <tr>
|
---|
| 581 | <td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> * QuaZip::getIoDevice </td>
|
---|
| 582 | <td>(</td>
|
---|
| 583 | <td class="paramname"></td><td>)</td>
|
---|
| 584 | <td> const</td>
|
---|
| 585 | </tr>
|
---|
| 586 | </table>
|
---|
| 587 | </div>
|
---|
| 588 | <div class="memdoc">
|
---|
| 589 |
|
---|
| 590 | <p>Returns the device representing this ZIP file. </p>
|
---|
| 591 | <p>Returns null string if no device has been set explicitly, for example when opening a ZIP file by name. </p>
|
---|
| 592 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a>, <a class="el" href="classQuaZip.html#a4f7deef08ff40aeb1a7a04bcd7f228c2" title="Returns the name of the ZIP file.">getZipName()</a>, <a class="el" href="classQuaZip.html#aa80b661de1262af905d1677dbcb008cc" title="Sets the name of the ZIP file.">setZipName()</a> </dd></dl>
|
---|
| 593 |
|
---|
| 594 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isEmpty">QString::isEmpty()</a>.</p>
|
---|
| 595 |
|
---|
| 596 | </div>
|
---|
| 597 | </div>
|
---|
| 598 | <a class="anchor" id="a64642948b6531ee54f5522f29e388cc6"></a><!-- doxytag: member="QuaZip::setIoDevice" ref="a64642948b6531ee54f5522f29e388cc6" args="(QIODevice *ioDevice)" -->
|
---|
| 599 | <div class="memitem">
|
---|
| 600 | <div class="memproto">
|
---|
| 601 | <table class="memname">
|
---|
| 602 | <tr>
|
---|
| 603 | <td class="memname">void QuaZip::setIoDevice </td>
|
---|
| 604 | <td>(</td>
|
---|
| 605 | <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>
|
---|
| 606 | <td class="paramname"><em>ioDevice</em></td><td>)</td>
|
---|
| 607 | <td></td>
|
---|
| 608 | </tr>
|
---|
| 609 | </table>
|
---|
| 610 | </div>
|
---|
| 611 | <div class="memdoc">
|
---|
| 612 |
|
---|
| 613 | <p>Sets the device representing the ZIP file. </p>
|
---|
| 614 | <p>Does nothing if the ZIP file is open.</p>
|
---|
| 615 | <p>Does not reset error code returned by <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a>. </p>
|
---|
| 616 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#afd3ba12fe68748acbf8b7cc14a5a1c29" title="Returns the device representing this ZIP file.">getIoDevice()</a>, <a class="el" href="classQuaZip.html#a4f7deef08ff40aeb1a7a04bcd7f228c2" title="Returns the name of the ZIP file.">getZipName()</a>, <a class="el" href="classQuaZip.html#aa80b661de1262af905d1677dbcb008cc" title="Sets the name of the ZIP file.">setZipName()</a> </dd></dl>
|
---|
| 617 |
|
---|
| 618 | <p>References <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>.</p>
|
---|
| 619 |
|
---|
| 620 | </div>
|
---|
| 621 | </div>
|
---|
| 622 | <a class="anchor" id="a28b91a6282ddd9382c96a069572c6fb4"></a><!-- doxytag: member="QuaZip::getZipError" ref="a28b91a6282ddd9382c96a069572c6fb4" args="() const " -->
|
---|
| 623 | <div class="memitem">
|
---|
| 624 | <div class="memproto">
|
---|
| 625 | <table class="memname">
|
---|
| 626 | <tr>
|
---|
| 627 | <td class="memname">int QuaZip::getZipError </td>
|
---|
| 628 | <td>(</td>
|
---|
| 629 | <td class="paramname"></td><td>)</td>
|
---|
| 630 | <td> const</td>
|
---|
| 631 | </tr>
|
---|
| 632 | </table>
|
---|
| 633 | </div>
|
---|
| 634 | <div class="memdoc">
|
---|
| 635 |
|
---|
| 636 | <p>Returns the error code of the last operation. </p>
|
---|
| 637 | <p>Returns <code>UNZ_OK</code> if the last operation was successful.</p>
|
---|
| 638 | <p>Error code resets to <code>UNZ_OK</code> every time you call any function that accesses something inside ZIP archive, even if it is <code>const</code> (like <a class="el" href="classQuaZip.html#a2ea4bd1fca948637c35c2d2752bb5a80" title="Returns number of the entries in the ZIP central directory.">getEntriesCount()</a>). <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> and <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f" title="Closes ZIP file.">close()</a> calls reset error code too. See documentation for the specific functions for details on error detection. </p>
|
---|
| 639 |
|
---|
| 640 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a42a39b12619bccd3d419ee60bbb3fcf6">QuaZipFile::close()</a>, <a class="el" href="classJlCompress.html#ada7511686a24c014e9db25735be148a7">JlCompress::compressDir()</a>, <a class="el" href="classJlCompress.html#a4a4de9c62ecf161bb658d4d80495ea97">JlCompress::compressFile()</a>, <a class="el" href="classJlCompress.html#a9cdb92d29a94c6b13a718a3249685846">JlCompress::compressFiles()</a>, <a class="el" href="classQuaZipFile.html#a7b8e3c39026855cd98661a1b2815c220">QuaZipFile::getActualFileName()</a>, <a class="el" href="classQuaZipFile.html#af35876a5ac6e9c35234275a9e503110d">QuaZipFile::getFileInfo()</a>, and <a class="el" href="classQuaZipFile.html#aed75bace51f2bb4c3e4f656ab4493aac">QuaZipFile::open()</a>.</p>
|
---|
| 641 |
|
---|
| 642 | </div>
|
---|
| 643 | </div>
|
---|
| 644 | <a class="anchor" id="a2ea4bd1fca948637c35c2d2752bb5a80"></a><!-- doxytag: member="QuaZip::getEntriesCount" ref="a2ea4bd1fca948637c35c2d2752bb5a80" args="() const " -->
|
---|
| 645 | <div class="memitem">
|
---|
| 646 | <div class="memproto">
|
---|
| 647 | <table class="memname">
|
---|
| 648 | <tr>
|
---|
| 649 | <td class="memname">int QuaZip::getEntriesCount </td>
|
---|
| 650 | <td>(</td>
|
---|
| 651 | <td class="paramname"></td><td>)</td>
|
---|
| 652 | <td> const</td>
|
---|
| 653 | </tr>
|
---|
| 654 | </table>
|
---|
| 655 | </div>
|
---|
| 656 | <div class="memdoc">
|
---|
| 657 |
|
---|
| 658 | <p>Returns number of the entries in the ZIP central directory. </p>
|
---|
| 659 | <p>Returns negative error code in the case of error. The same error code will be returned by subsequent <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> call. </p>
|
---|
| 660 |
|
---|
| 661 | <p>References <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, and <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>.</p>
|
---|
| 662 |
|
---|
| 663 | </div>
|
---|
| 664 | </div>
|
---|
| 665 | <a class="anchor" id="a1b5d936a203859340574d5908ffa2222"></a><!-- doxytag: member="QuaZip::setComment" ref="a1b5d936a203859340574d5908ffa2222" args="(const QString &comment)" -->
|
---|
| 666 | <div class="memitem">
|
---|
| 667 | <div class="memproto">
|
---|
| 668 | <table class="memname">
|
---|
| 669 | <tr>
|
---|
| 670 | <td class="memname">void QuaZip::setComment </td>
|
---|
| 671 | <td>(</td>
|
---|
| 672 | <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> & </td>
|
---|
| 673 | <td class="paramname"><em>comment</em></td><td>)</td>
|
---|
| 674 | <td></td>
|
---|
| 675 | </tr>
|
---|
| 676 | </table>
|
---|
| 677 | </div>
|
---|
| 678 | <div class="memdoc">
|
---|
| 679 |
|
---|
| 680 | <p>Sets the global comment in the ZIP file. </p>
|
---|
| 681 | <p>The comment will be written to the archive on close operation. <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> makes a distinction between a null QByteArray() comment and an empty "" comment in the <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a22c745f349f06add449af523254fdaec" title="ZIP file was opened for adding files in the archive.">QuaZip::mdAdd</a> mode. A null comment is the default and it means "don't change the comment". An empty comment removes the original comment.</p>
|
---|
| 682 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> </dd></dl>
|
---|
| 683 |
|
---|
| 684 | </div>
|
---|
| 685 | </div>
|
---|
| 686 | <a class="anchor" id="a745488f9177bcec3cdb858587584e033"></a><!-- doxytag: member="QuaZip::goToFirstFile" ref="a745488f9177bcec3cdb858587584e033" args="()" -->
|
---|
| 687 | <div class="memitem">
|
---|
| 688 | <div class="memproto">
|
---|
| 689 | <table class="memname">
|
---|
| 690 | <tr>
|
---|
| 691 | <td class="memname">bool QuaZip::goToFirstFile </td>
|
---|
| 692 | <td>(</td>
|
---|
| 693 | <td class="paramname"></td><td>)</td>
|
---|
| 694 | <td></td>
|
---|
| 695 | </tr>
|
---|
| 696 | </table>
|
---|
| 697 | </div>
|
---|
| 698 | <div class="memdoc">
|
---|
| 699 |
|
---|
| 700 | <p>Sets the current file to the first file in the archive. </p>
|
---|
| 701 | <p>Returns <code>true</code> on success, <code>false</code> otherwise. Call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> to get the error code. </p>
|
---|
| 702 |
|
---|
| 703 | <p>References <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, and <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>.</p>
|
---|
| 704 |
|
---|
| 705 | </div>
|
---|
| 706 | </div>
|
---|
| 707 | <a class="anchor" id="aee6779b6cd338420c2e8c5655fa8ba97"></a><!-- doxytag: member="QuaZip::goToNextFile" ref="aee6779b6cd338420c2e8c5655fa8ba97" args="()" -->
|
---|
| 708 | <div class="memitem">
|
---|
| 709 | <div class="memproto">
|
---|
| 710 | <table class="memname">
|
---|
| 711 | <tr>
|
---|
| 712 | <td class="memname">bool QuaZip::goToNextFile </td>
|
---|
| 713 | <td>(</td>
|
---|
| 714 | <td class="paramname"></td><td>)</td>
|
---|
| 715 | <td></td>
|
---|
| 716 | </tr>
|
---|
| 717 | </table>
|
---|
| 718 | </div>
|
---|
| 719 | <div class="memdoc">
|
---|
| 720 |
|
---|
| 721 | <p>Sets the current file to the next file in the archive. </p>
|
---|
| 722 | <p>Returns <code>true</code> on success, <code>false</code> otherwise. Call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> to determine if there was an error.</p>
|
---|
| 723 | <p>Should be used only in <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897" title="ZIP file is open for reading files inside it.">QuaZip::mdUnzip</a> mode.</p>
|
---|
| 724 | <dl class="note"><dt><b>Note:</b></dt><dd>If the end of file was reached, <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> will return <code>UNZ_OK</code> instead of <code>UNZ_END_OF_LIST_OF_FILE</code>. This is to make things like this easier: <div class="fragment"><pre class="fragment"> <span class="keywordflow">for</span>(<span class="keywordtype">bool</span> more=zip.goToFirstFile(); more; more=zip.goToNextFile()) {
|
---|
| 725 | <span class="comment">// do something</span>
|
---|
| 726 | }
|
---|
| 727 | <span class="keywordflow">if</span>(zip.getZipError()==UNZ_OK) {
|
---|
| 728 | <span class="comment">// ok, there was no error</span>
|
---|
| 729 | }
|
---|
| 730 | </pre></div> </dd></dl>
|
---|
| 731 |
|
---|
| 732 | <p>References <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, and <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>.</p>
|
---|
| 733 |
|
---|
| 734 | <p>Referenced by <a class="el" href="classQuaZip.html#a6c657bfcfccb59d728e0da24c677d899">setCurrentFile()</a>.</p>
|
---|
| 735 |
|
---|
| 736 | </div>
|
---|
| 737 | </div>
|
---|
| 738 | <a class="anchor" id="a6c657bfcfccb59d728e0da24c677d899"></a><!-- doxytag: member="QuaZip::setCurrentFile" ref="a6c657bfcfccb59d728e0da24c677d899" args="(const QString &fileName, CaseSensitivity cs=csDefault)" -->
|
---|
| 739 | <div class="memitem">
|
---|
| 740 | <div class="memproto">
|
---|
| 741 | <table class="memname">
|
---|
| 742 | <tr>
|
---|
| 743 | <td class="memname">bool QuaZip::setCurrentFile </td>
|
---|
| 744 | <td>(</td>
|
---|
| 745 | <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> & </td>
|
---|
| 746 | <td class="paramname"><em>fileName</em>, </td>
|
---|
| 747 | </tr>
|
---|
| 748 | <tr>
|
---|
| 749 | <td class="paramkey"></td>
|
---|
| 750 | <td></td>
|
---|
| 751 | <td class="paramtype"><a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe">CaseSensitivity</a> </td>
|
---|
| 752 | <td class="paramname"><em>cs</em> = <code>csDefault</code> </td>
|
---|
| 753 | </tr>
|
---|
| 754 | <tr>
|
---|
| 755 | <td></td>
|
---|
| 756 | <td>)</td>
|
---|
| 757 | <td></td><td></td>
|
---|
| 758 | </tr>
|
---|
| 759 | </table>
|
---|
| 760 | </div>
|
---|
| 761 | <div class="memdoc">
|
---|
| 762 |
|
---|
| 763 | <p>Sets current file by its name. </p>
|
---|
| 764 | <p>Returns <code>true</code> if successful, <code>false</code> otherwise. Argument <em>cs</em> specifies case sensitivity of the file name. Call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> in the case of a failure to get error code.</p>
|
---|
| 765 | <p>This is not a wrapper to unzLocateFile() function. That is because I had to implement locale-specific case-insensitive comparison.</p>
|
---|
| 766 | <p>Here are the differences from the original implementation:</p>
|
---|
| 767 | <ul>
|
---|
| 768 | <li>If the file was not found, error code is <code>UNZ_OK</code>, not <code>UNZ_END_OF_LIST_OF_FILE</code> (see also <a class="el" href="classQuaZip.html#aee6779b6cd338420c2e8c5655fa8ba97" title="Sets the current file to the next file in the archive.">goToNextFile()</a>).</li>
|
---|
| 769 | <li>If this function fails, it unsets the current file rather than resetting it back to what it was before the call.</li>
|
---|
| 770 | </ul>
|
---|
| 771 | <p>If <em>fileName</em> is null string then this function unsets the current file and return <code>true</code>. Note that you should close the file first if it is open! See <a class="el" href="classQuaZipFile.html#a54e944a6b3d27030f64c8f30d2cc33bb" title="Constructs a QuaZipFile instance.">QuaZipFile::QuaZipFile(QuaZip*,QObject*)</a> for the details.</p>
|
---|
| 772 | <p>Should be used only in <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897" title="ZIP file is open for reading files inside it.">QuaZip::mdUnzip</a> mode.</p>
|
---|
| 773 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a339010b5566704ba3c9cafbfe848d8fb" title="Sets the codec used to encode/decode file names inside archive.">setFileNameCodec()</a>, <a class="el" href="classQuaZip.html#a6053a1d249ed210a85c9d5eb7cf9cdbe" title="Case sensitivity for the file names.">CaseSensitivity</a> </dd></dl>
|
---|
| 774 |
|
---|
| 775 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qhash.html#contains">QHash::contains()</a>, <a class="el" href="classQuaZip.html#a1d3fbd445a8e9d3449ded7371931c6b3">convertCaseSensitivity()</a>, <a class="el" href="classQuaZip.html#a9783f8b4f39cd55e71e975aea78fd54a">getCurrentFileName()</a>, <a class="el" href="classQuaZip.html#aee6779b6cd338420c2e8c5655fa8ba97">goToNextFile()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isEmpty">QString::isEmpty()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#length">QString::length()</a>, <a class="el" href="classQuaZip.html#adce46b942c341dbb5c851eadead65459ab26ce1a9c9e94f901dc2cf90fa5baa4b">MAX_FILE_NAME_LENGTH</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#toLower">QString::toLower()</a>, <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qhash.html#value">QHash::value()</a>.</p>
|
---|
| 776 |
|
---|
| 777 | <p>Referenced by <a class="el" href="classQuaZipFile.html#aed75bace51f2bb4c3e4f656ab4493aac">QuaZipFile::open()</a>.</p>
|
---|
| 778 |
|
---|
| 779 | </div>
|
---|
| 780 | </div>
|
---|
| 781 | <a class="anchor" id="a9c91a53ed4c2038e153c64bdc097ebe8"></a><!-- doxytag: member="QuaZip::getCurrentFileInfo" ref="a9c91a53ed4c2038e153c64bdc097ebe8" args="(QuaZipFileInfo *info) const " -->
|
---|
| 782 | <div class="memitem">
|
---|
| 783 | <div class="memproto">
|
---|
| 784 | <table class="memname">
|
---|
| 785 | <tr>
|
---|
| 786 | <td class="memname">bool QuaZip::getCurrentFileInfo </td>
|
---|
| 787 | <td>(</td>
|
---|
| 788 | <td class="paramtype"><a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> * </td>
|
---|
| 789 | <td class="paramname"><em>info</em></td><td>)</td>
|
---|
| 790 | <td> const</td>
|
---|
| 791 | </tr>
|
---|
| 792 | </table>
|
---|
| 793 | </div>
|
---|
| 794 | <div class="memdoc">
|
---|
| 795 |
|
---|
| 796 | <p>Retrieves information about the current file. </p>
|
---|
| 797 | <p>Fills the structure pointed by <em>info</em>. Returns <code>true</code> on success, <code>false</code> otherwise. In the latter case structure pointed by <em>info</em> remains untouched. If there was an error, <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> returns error code.</p>
|
---|
| 798 | <p>Should be used only in <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897" title="ZIP file is open for reading files inside it.">QuaZip::mdUnzip</a> mode.</p>
|
---|
| 799 | <p>Does nothing and returns <code>false</code> in any of the following cases.</p>
|
---|
| 800 | <ul>
|
---|
| 801 | <li>ZIP is not open;</li>
|
---|
| 802 | <li>ZIP does not have current file.</li>
|
---|
| 803 | </ul>
|
---|
| 804 | <p>In both cases <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> returns <code>UNZ_OK</code> since there is no ZIP/UNZIP API call.</p>
|
---|
| 805 | <p>This overload doesn't support zip64, but will work OK on zip64 archives except that if one of the sizes (compressed or uncompressed) is greater than 0xFFFFFFFFu, it will be set to exactly 0xFFFFFFFFu.</p>
|
---|
| 806 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a7ba6daf39263c308c683e7f72f74e0ae" title="Retrieves information about the current file.">getCurrentFileInfo(QuaZipFileInfo64* info)const</a> </dd>
|
---|
| 807 | <dd>
|
---|
| 808 | <a class="el" href="structQuaZipFileInfo64.html#ada29945c7ee4c9df6fbe95864793aade" title="Converts to QuaZipFileInfo.">QuaZipFileInfo64::toQuaZipFileInfo(QuaZipFileInfo&)const</a> </dd></dl>
|
---|
| 809 |
|
---|
| 810 | <p>References <a class="el" href="structQuaZipFileInfo64.html#ada29945c7ee4c9df6fbe95864793aade">QuaZipFileInfo64::toQuaZipFileInfo()</a>.</p>
|
---|
| 811 |
|
---|
| 812 | <p>Referenced by <a class="el" href="classQuaZipFile.html#af35876a5ac6e9c35234275a9e503110d">QuaZipFile::getFileInfo()</a>.</p>
|
---|
| 813 |
|
---|
| 814 | </div>
|
---|
| 815 | </div>
|
---|
| 816 | <a class="anchor" id="a7ba6daf39263c308c683e7f72f74e0ae"></a><!-- doxytag: member="QuaZip::getCurrentFileInfo" ref="a7ba6daf39263c308c683e7f72f74e0ae" args="(QuaZipFileInfo64 *info) const " -->
|
---|
| 817 | <div class="memitem">
|
---|
| 818 | <div class="memproto">
|
---|
| 819 | <table class="memname">
|
---|
| 820 | <tr>
|
---|
| 821 | <td class="memname">bool QuaZip::getCurrentFileInfo </td>
|
---|
| 822 | <td>(</td>
|
---|
| 823 | <td class="paramtype"><a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> * </td>
|
---|
| 824 | <td class="paramname"><em>info</em></td><td>)</td>
|
---|
| 825 | <td> const</td>
|
---|
| 826 | </tr>
|
---|
| 827 | </table>
|
---|
| 828 | </div>
|
---|
| 829 | <div class="memdoc">
|
---|
| 830 |
|
---|
| 831 | <p>Retrieves information about the current file. </p>
|
---|
| 832 | <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function supports zip64. If the archive doesn't use zip64, it is completely equivalent to getCurrentFileInfo(QuaZipFileInfo* info) except for the argument type.</p>
|
---|
| 833 | <dl class="see"><dt><b>See also:</b></dt><dd></dd></dl>
|
---|
| 834 |
|
---|
| 835 | <p>References <a class="el" href="structQuaZipFileInfo64.html#aba3f5b982087c3e0343bb61e8814c7d1">QuaZipFileInfo64::comment</a>, <a class="el" href="structQuaZipFileInfo64.html#add8733946ea4af23aa32d85f10955b0f">QuaZipFileInfo64::compressedSize</a>, <a class="el" href="structQuaZipFileInfo64.html#aeb7b2757a0efa814b196b5280d000a14">QuaZipFileInfo64::crc</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#data">QByteArray::data()</a>, <a class="el" href="structQuaZipFileInfo64.html#a4d77c6aa6076703e858c938efeb551e4">QuaZipFileInfo64::dateTime</a>, <a class="el" href="structQuaZipFileInfo64.html#ac8945cf1ff54d39d28e755685b91e941">QuaZipFileInfo64::diskNumberStart</a>, <a class="el" href="structQuaZipFileInfo64.html#a3a8bc40f1aa0cb0985c4e2f8a9678430">QuaZipFileInfo64::externalAttr</a>, <a class="el" href="structQuaZipFileInfo64.html#acf0b1b97f377208847c6912cd1bf1332">QuaZipFileInfo64::extra</a>, <a class="el" href="structQuaZipFileInfo64.html#a6aa533dd4e02f52459e1e1a0df31e992">QuaZipFileInfo64::flags</a>, <a class="el" href="classQuaZip.html#a00b237d926648f45da86db25e7cfb697">hasCurrentFile()</a>, <a class="el" href="structQuaZipFileInfo64.html#aeb895613e76a4cc63f861b010c9e92c0">QuaZipFileInfo64::internalAttr</a>, <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, <a class="el" href="structQuaZipFileInfo64.html#a445967ecbb5a3dd2a9d516db3e14a34a">QuaZipFileInfo64::method</a>, <a class="el" href="structQuaZipFileInfo64.html#a2cadad4cb9a765e90b5422dae2388762">QuaZipFileInfo64::name</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#resize">QByteArray::resize()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#size">QByteArray::size()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#toUnicode">QTextCodec::toUnicode()</a>, <a class="el" href="structQuaZipFileInfo64.html#a571ca077fe282c908e57b0bc82528d49">QuaZipFileInfo64::uncompressedSize</a>, <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>, <a class="el" href="structQuaZipFileInfo64.html#a95aeb06b080e483fde874ba2d06f203c">QuaZipFileInfo64::versionCreated</a>, and <a class="el" href="structQuaZipFileInfo64.html#a27654f5ce3a75331e9c9a7900b407169">QuaZipFileInfo64::versionNeeded</a>.</p>
|
---|
| 836 |
|
---|
| 837 | </div>
|
---|
| 838 | </div>
|
---|
| 839 | <a class="anchor" id="a9783f8b4f39cd55e71e975aea78fd54a"></a><!-- doxytag: member="QuaZip::getCurrentFileName" ref="a9783f8b4f39cd55e71e975aea78fd54a" args="() const " -->
|
---|
| 840 | <div class="memitem">
|
---|
| 841 | <div class="memproto">
|
---|
| 842 | <table class="memname">
|
---|
| 843 | <tr>
|
---|
| 844 | <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> QuaZip::getCurrentFileName </td>
|
---|
| 845 | <td>(</td>
|
---|
| 846 | <td class="paramname"></td><td>)</td>
|
---|
| 847 | <td> const</td>
|
---|
| 848 | </tr>
|
---|
| 849 | </table>
|
---|
| 850 | </div>
|
---|
| 851 | <div class="memdoc">
|
---|
| 852 |
|
---|
| 853 | <p>Returns the current file name. </p>
|
---|
| 854 | <p>Equivalent to calling <a class="el" href="classQuaZip.html#a9c91a53ed4c2038e153c64bdc097ebe8" title="Retrieves information about the current file.">getCurrentFileInfo()</a> and then getting <code>name</code> field of the <a class="el" href="structQuaZipFileInfo.html" title="Information about a file inside archive.">QuaZipFileInfo</a> structure, but faster and more convenient.</p>
|
---|
| 855 | <p>Should be used only in <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897" title="ZIP file is open for reading files inside it.">QuaZip::mdUnzip</a> mode. </p>
|
---|
| 856 |
|
---|
| 857 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#constData">QByteArray::constData()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#data">QByteArray::data()</a>, <a class="el" href="classQuaZip.html#a00b237d926648f45da86db25e7cfb697">hasCurrentFile()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#isEmpty">QString::isEmpty()</a>, <a class="el" href="classQuaZip.html#a5b869a9c0d4f49955b759592fec08888">isOpen()</a>, <a class="el" href="classQuaZip.html#adce46b942c341dbb5c851eadead65459ab26ce1a9c9e94f901dc2cf90fa5baa4b">MAX_FILE_NAME_LENGTH</a>, <a class="el" href="classQuaZip.html#a47e28d4116ee716fdd6b431b821d0be4a803a371910c2dc830d111e9ce5b58897">mdUnzip</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html#size">QByteArray::size()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#toUnicode">QTextCodec::toUnicode()</a>, and <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>.</p>
|
---|
| 858 |
|
---|
| 859 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a7b8e3c39026855cd98661a1b2815c220">QuaZipFile::getActualFileName()</a>, and <a class="el" href="classQuaZip.html#a6c657bfcfccb59d728e0da24c677d899">setCurrentFile()</a>.</p>
|
---|
| 860 |
|
---|
| 861 | </div>
|
---|
| 862 | </div>
|
---|
| 863 | <a class="anchor" id="a3b78a652f296ff4a678a791e8294e642"></a><!-- doxytag: member="QuaZip::getUnzFile" ref="a3b78a652f296ff4a678a791e8294e642" args="()" -->
|
---|
| 864 | <div class="memitem">
|
---|
| 865 | <div class="memproto">
|
---|
| 866 | <table class="memname">
|
---|
| 867 | <tr>
|
---|
| 868 | <td class="memname">unzFile QuaZip::getUnzFile </td>
|
---|
| 869 | <td>(</td>
|
---|
| 870 | <td class="paramname"></td><td>)</td>
|
---|
| 871 | <td></td>
|
---|
| 872 | </tr>
|
---|
| 873 | </table>
|
---|
| 874 | </div>
|
---|
| 875 | <div class="memdoc">
|
---|
| 876 |
|
---|
| 877 | <p>Returns <code>unzFile</code> handle. </p>
|
---|
| 878 | <p>You can use this handle to directly call UNZIP part of the ZIP/UNZIP package functions (see unzip.h).</p>
|
---|
| 879 | <dl class="warning"><dt><b>Warning:</b></dt><dd>When using the handle returned by this function, please keep in mind that <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> class is unable to detect any changes you make in the ZIP file state (e. g. changing current file, or closing the handle). So please do not do anything with this handle that is possible to do with the functions of this class. Or at least return the handle in the original state before calling some another function of this class (including implicit destructor calls and calls from the <a class="el" href="classQuaZipFile.html" title="A file inside ZIP archive.">QuaZipFile</a> objects that refer to this <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> instance!). So if you have changed the current file in the ZIP archive - then change it back or you may experience some strange behavior or even crashes. </dd></dl>
|
---|
| 880 |
|
---|
| 881 | <p>References <a class="el" href="classQuaZipPrivate.html#aeb1d2d3263929b17d6b0608e35af2a88">QuaZipPrivate::unzFile_f</a>.</p>
|
---|
| 882 |
|
---|
| 883 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a1e3f4c3c075da98af426fc167440cfc3">QuaZipFile::atEnd()</a>, <a class="el" href="classQuaZipFile.html#a42a39b12619bccd3d419ee60bbb3fcf6">QuaZipFile::close()</a>, <a class="el" href="classQuaZipFile.html#ac4da08e5cdec368a2a686775f7dc5639">QuaZipFile::csize()</a>, <a class="el" href="classQuaZipFile.html#aed75bace51f2bb4c3e4f656ab4493aac">QuaZipFile::open()</a>, <a class="el" href="classQuaZipFile.html#a90fd55dab83eca7f95df50b2c41b7f22">QuaZipFile::pos()</a>, <a class="el" href="classQuaZipFile.html#aa1f2274e1579327855a17d67a9046ec2">QuaZipFile::readData()</a>, and <a class="el" href="classQuaZipFile.html#a4814b5e6e39fb254737b81ea10964f50">QuaZipFile::usize()</a>.</p>
|
---|
| 884 |
|
---|
| 885 | </div>
|
---|
| 886 | </div>
|
---|
| 887 | <a class="anchor" id="a425043a4d7cc31e2fe2bba73d954f15c"></a><!-- doxytag: member="QuaZip::getZipFile" ref="a425043a4d7cc31e2fe2bba73d954f15c" args="()" -->
|
---|
| 888 | <div class="memitem">
|
---|
| 889 | <div class="memproto">
|
---|
| 890 | <table class="memname">
|
---|
| 891 | <tr>
|
---|
| 892 | <td class="memname">zipFile QuaZip::getZipFile </td>
|
---|
| 893 | <td>(</td>
|
---|
| 894 | <td class="paramname"></td><td>)</td>
|
---|
| 895 | <td></td>
|
---|
| 896 | </tr>
|
---|
| 897 | </table>
|
---|
| 898 | </div>
|
---|
| 899 | <div class="memdoc">
|
---|
| 900 |
|
---|
| 901 | <p>Returns <code>zipFile</code> handle. </p>
|
---|
| 902 | <p>You can use this handle to directly call ZIP part of the ZIP/UNZIP package functions (see zip.h). Warnings about the <a class="el" href="classQuaZip.html#a3b78a652f296ff4a678a791e8294e642" title="Returns unzFile handle.">getUnzFile()</a> function also apply to this function. </p>
|
---|
| 903 |
|
---|
| 904 | <p>References <a class="el" href="classQuaZipPrivate.html#ab83497156892d07e6a1514cef149a1e2">QuaZipPrivate::zipFile_f</a>.</p>
|
---|
| 905 |
|
---|
| 906 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a42a39b12619bccd3d419ee60bbb3fcf6">QuaZipFile::close()</a>, <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>, and <a class="el" href="classQuaZipFile.html#abd07949a6fcc2ef094d2be5398bc8e7c">QuaZipFile::writeData()</a>.</p>
|
---|
| 907 |
|
---|
| 908 | </div>
|
---|
| 909 | </div>
|
---|
| 910 | <a class="anchor" id="a6c23a12af88f7ea5edd4f9c0a24b9453"></a><!-- doxytag: member="QuaZip::setDataDescriptorWritingEnabled" ref="a6c23a12af88f7ea5edd4f9c0a24b9453" args="(bool enabled)" -->
|
---|
| 911 | <div class="memitem">
|
---|
| 912 | <div class="memproto">
|
---|
| 913 | <table class="memname">
|
---|
| 914 | <tr>
|
---|
| 915 | <td class="memname">void QuaZip::setDataDescriptorWritingEnabled </td>
|
---|
| 916 | <td>(</td>
|
---|
| 917 | <td class="paramtype">bool </td>
|
---|
| 918 | <td class="paramname"><em>enabled</em></td><td>)</td>
|
---|
| 919 | <td></td>
|
---|
| 920 | </tr>
|
---|
| 921 | </table>
|
---|
| 922 | </div>
|
---|
| 923 | <div class="memdoc">
|
---|
| 924 |
|
---|
| 925 | <p>Changes the data descriptor writing mode. </p>
|
---|
| 926 | <p>According to the ZIP format specification, a file inside archive may have a data descriptor immediately following the file data. This is reflected by a special flag in the local file header and in the central directory. By default, QuaZIP sets this flag and writes the data descriptor unless both method and level were set to 0, in which case it operates in 1.0-compatible mode and never writes data descriptors.</p>
|
---|
| 927 | <p>By setting this flag to false, it is possible to disable data descriptor writing, thus increasing compatibility with archive readers that don't understand this feature of the ZIP file format.</p>
|
---|
| 928 | <p>Setting this flag affects all the <a class="el" href="classQuaZipFile.html" title="A file inside ZIP archive.">QuaZipFile</a> instances that are opened after this flag is set.</p>
|
---|
| 929 | <p>The data descriptor writing mode is enabled by default.</p>
|
---|
| 930 | <p>Note that if the ZIP archive is written into a <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> for which <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html#isSequential">QIODevice::isSequential()</a> returns <code>true</code>, then the data descriptor is mandatory and will be written even if this flag is set to false.</p>
|
---|
| 931 | <dl><dt><b>Parameters:</b></dt><dd>
|
---|
| 932 | <table class="params">
|
---|
| 933 | <tr><td class="paramname">enabled</td><td>If <code>true</code>, enable local descriptor writing, disable it otherwise.</td></tr>
|
---|
| 934 | </table>
|
---|
| 935 | </dd>
|
---|
| 936 | </dl>
|
---|
| 937 | <dl class="see"><dt><b>See also:</b></dt><dd>QuaZipFile::isDataDescriptorWritingEnabled() </dd></dl>
|
---|
| 938 |
|
---|
| 939 | </div>
|
---|
| 940 | </div>
|
---|
| 941 | <a class="anchor" id="ae5c665a59447c2d30e63e9c6df48ebb7"></a><!-- doxytag: member="QuaZip::isDataDescriptorWritingEnabled" ref="ae5c665a59447c2d30e63e9c6df48ebb7" args="() const " -->
|
---|
| 942 | <div class="memitem">
|
---|
| 943 | <div class="memproto">
|
---|
| 944 | <table class="memname">
|
---|
| 945 | <tr>
|
---|
| 946 | <td class="memname">bool QuaZip::isDataDescriptorWritingEnabled </td>
|
---|
| 947 | <td>(</td>
|
---|
| 948 | <td class="paramname"></td><td>)</td>
|
---|
| 949 | <td> const</td>
|
---|
| 950 | </tr>
|
---|
| 951 | </table>
|
---|
| 952 | </div>
|
---|
| 953 | <div class="memdoc">
|
---|
| 954 |
|
---|
| 955 | <p>Returns the data descriptor default writing mode. </p>
|
---|
| 956 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a6c23a12af88f7ea5edd4f9c0a24b9453" title="Changes the data descriptor writing mode.">setDataDescriptorWritingEnabled()</a> </dd></dl>
|
---|
| 957 |
|
---|
| 958 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>
|
---|
| 959 |
|
---|
| 960 | </div>
|
---|
| 961 | </div>
|
---|
| 962 | <a class="anchor" id="abb38d8b4c9c4ae0728b48caae9dd82de"></a><!-- doxytag: member="QuaZip::getFileNameList" ref="abb38d8b4c9c4ae0728b48caae9dd82de" args="() const " -->
|
---|
| 963 | <div class="memitem">
|
---|
| 964 | <div class="memproto">
|
---|
| 965 | <table class="memname">
|
---|
| 966 | <tr>
|
---|
| 967 | <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> QuaZip::getFileNameList </td>
|
---|
| 968 | <td>(</td>
|
---|
| 969 | <td class="paramname"></td><td>)</td>
|
---|
| 970 | <td> const</td>
|
---|
| 971 | </tr>
|
---|
| 972 | </table>
|
---|
| 973 | </div>
|
---|
| 974 | <div class="memdoc">
|
---|
| 975 |
|
---|
| 976 | <p>Returns a list of files inside the archive. </p>
|
---|
| 977 | <dl class="return"><dt><b>Returns:</b></dt><dd>A list of file names or an empty list if there was an error or if the archive is empty (call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> to figure out which). </dd></dl>
|
---|
| 978 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a7486af66bede8e131db0cd2e81881387" title="Returns information list about all files inside the archive.">getFileInfoList()</a> </dd></dl>
|
---|
| 979 |
|
---|
| 980 | </div>
|
---|
| 981 | </div>
|
---|
| 982 | <a class="anchor" id="a7486af66bede8e131db0cd2e81881387"></a><!-- doxytag: member="QuaZip::getFileInfoList" ref="a7486af66bede8e131db0cd2e81881387" args="() const " -->
|
---|
| 983 | <div class="memitem">
|
---|
| 984 | <div class="memproto">
|
---|
| 985 | <table class="memname">
|
---|
| 986 | <tr>
|
---|
| 987 | <td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qlist.html">QList</a>< <a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> > QuaZip::getFileInfoList </td>
|
---|
| 988 | <td>(</td>
|
---|
| 989 | <td class="paramname"></td><td>)</td>
|
---|
| 990 | <td> const</td>
|
---|
| 991 | </tr>
|
---|
| 992 | </table>
|
---|
| 993 | </div>
|
---|
| 994 | <div class="memdoc">
|
---|
| 995 |
|
---|
| 996 | <p>Returns information list about all files inside the archive. </p>
|
---|
| 997 | <dl class="return"><dt><b>Returns:</b></dt><dd>A list of <a class="el" href="structQuaZipFileInfo.html" title="Information about a file inside archive.">QuaZipFileInfo</a> objects or an empty list if there was an error or if the archive is empty (call <a class="el" href="classQuaZip.html#a28b91a6282ddd9382c96a069572c6fb4" title="Returns the error code of the last operation.">getZipError()</a> to figure out which).</dd></dl>
|
---|
| 998 | <p>This function doesn't support zip64, but will still work with zip64 archives, converting results using <a class="el" href="structQuaZipFileInfo64.html#ada29945c7ee4c9df6fbe95864793aade" title="Converts to QuaZipFileInfo.">QuaZipFileInfo64::toQuaZipFileInfo()</a>. If all file sizes are below 4 GB, it will work just fine.</p>
|
---|
| 999 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#abb38d8b4c9c4ae0728b48caae9dd82de" title="Returns a list of files inside the archive.">getFileNameList()</a> </dd>
|
---|
| 1000 | <dd>
|
---|
| 1001 | <a class="el" href="classQuaZip.html#a474e66b1b696a9e00edcc067484c36ad" title="Returns information list about all files inside the archive.">getFileInfoList64()</a> </dd></dl>
|
---|
| 1002 |
|
---|
| 1003 | </div>
|
---|
| 1004 | </div>
|
---|
| 1005 | <a class="anchor" id="a474e66b1b696a9e00edcc067484c36ad"></a><!-- doxytag: member="QuaZip::getFileInfoList64" ref="a474e66b1b696a9e00edcc067484c36ad" args="() const " -->
|
---|
| 1006 | <div class="memitem">
|
---|
| 1007 | <div class="memproto">
|
---|
| 1008 | <table class="memname">
|
---|
| 1009 | <tr>
|
---|
| 1010 | <td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qlist.html">QList</a>< <a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> > QuaZip::getFileInfoList64 </td>
|
---|
| 1011 | <td>(</td>
|
---|
| 1012 | <td class="paramname"></td><td>)</td>
|
---|
| 1013 | <td> const</td>
|
---|
| 1014 | </tr>
|
---|
| 1015 | </table>
|
---|
| 1016 | </div>
|
---|
| 1017 | <div class="memdoc">
|
---|
| 1018 |
|
---|
| 1019 | <p>Returns information list about all files inside the archive. </p>
|
---|
| 1020 | <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function supports zip64.</p>
|
---|
| 1021 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#abb38d8b4c9c4ae0728b48caae9dd82de" title="Returns a list of files inside the archive.">getFileNameList()</a> </dd>
|
---|
| 1022 | <dd>
|
---|
| 1023 | <a class="el" href="classQuaZip.html#a7486af66bede8e131db0cd2e81881387" title="Returns information list about all files inside the archive.">getFileInfoList()</a> </dd></dl>
|
---|
| 1024 |
|
---|
| 1025 | </div>
|
---|
| 1026 | </div>
|
---|
| 1027 | <a class="anchor" id="ab99a22efae02ebb4b5c9cd8eedc1c0b0"></a><!-- doxytag: member="QuaZip::setZip64Enabled" ref="ab99a22efae02ebb4b5c9cd8eedc1c0b0" args="(bool zip64)" -->
|
---|
| 1028 | <div class="memitem">
|
---|
| 1029 | <div class="memproto">
|
---|
| 1030 | <table class="memname">
|
---|
| 1031 | <tr>
|
---|
| 1032 | <td class="memname">void QuaZip::setZip64Enabled </td>
|
---|
| 1033 | <td>(</td>
|
---|
| 1034 | <td class="paramtype">bool </td>
|
---|
| 1035 | <td class="paramname"><em>zip64</em></td><td>)</td>
|
---|
| 1036 | <td></td>
|
---|
| 1037 | </tr>
|
---|
| 1038 | </table>
|
---|
| 1039 | </div>
|
---|
| 1040 | <div class="memdoc">
|
---|
| 1041 |
|
---|
| 1042 | <p>Enables the zip64 mode. </p>
|
---|
| 1043 | <dl><dt><b>Parameters:</b></dt><dd>
|
---|
| 1044 | <table class="params">
|
---|
| 1045 | <tr><td class="paramname">zip64</td><td>If <code>true</code>, the zip64 mode is enabled, disabled otherwise.</td></tr>
|
---|
| 1046 | </table>
|
---|
| 1047 | </dd>
|
---|
| 1048 | </dl>
|
---|
| 1049 | <p>Once this is enabled, all new files (until the mode is disabled again) will be created in the zip64 mode, thus enabling the ability to write files larger than 4 GB. By default, the zip64 mode is off due to compatibility reasons.</p>
|
---|
| 1050 | <p>Note that this does not affect the ability to read zip64 archives in any way.</p>
|
---|
| 1051 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a1b638566390d7599ba5982e844b151f4" title="Returns whether the zip64 mode is enabled.">isZip64Enabled()</a> </dd></dl>
|
---|
| 1052 |
|
---|
| 1053 | </div>
|
---|
| 1054 | </div>
|
---|
| 1055 | <a class="anchor" id="a1b638566390d7599ba5982e844b151f4"></a><!-- doxytag: member="QuaZip::isZip64Enabled" ref="a1b638566390d7599ba5982e844b151f4" args="() const " -->
|
---|
| 1056 | <div class="memitem">
|
---|
| 1057 | <div class="memproto">
|
---|
| 1058 | <table class="memname">
|
---|
| 1059 | <tr>
|
---|
| 1060 | <td class="memname">bool QuaZip::isZip64Enabled </td>
|
---|
| 1061 | <td>(</td>
|
---|
| 1062 | <td class="paramname"></td><td>)</td>
|
---|
| 1063 | <td> const</td>
|
---|
| 1064 | </tr>
|
---|
| 1065 | </table>
|
---|
| 1066 | </div>
|
---|
| 1067 | <div class="memdoc">
|
---|
| 1068 |
|
---|
| 1069 | <p>Returns whether the zip64 mode is enabled. </p>
|
---|
| 1070 | <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if and only if the zip64 mode is enabled.</dd></dl>
|
---|
| 1071 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#ab99a22efae02ebb4b5c9cd8eedc1c0b0" title="Enables the zip64 mode.">setZip64Enabled()</a> </dd></dl>
|
---|
| 1072 |
|
---|
| 1073 | <p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>
|
---|
| 1074 |
|
---|
| 1075 | </div>
|
---|
| 1076 | </div>
|
---|
| 1077 | <a class="anchor" id="adc2cc762ab5744720ae4d33290b5f5bf"></a><!-- doxytag: member="QuaZip::isAutoClose" ref="adc2cc762ab5744720ae4d33290b5f5bf" args="() const " -->
|
---|
| 1078 | <div class="memitem">
|
---|
| 1079 | <div class="memproto">
|
---|
| 1080 | <table class="memname">
|
---|
| 1081 | <tr>
|
---|
| 1082 | <td class="memname">bool QuaZip::isAutoClose </td>
|
---|
| 1083 | <td>(</td>
|
---|
| 1084 | <td class="paramname"></td><td>)</td>
|
---|
| 1085 | <td> const</td>
|
---|
| 1086 | </tr>
|
---|
| 1087 | </table>
|
---|
| 1088 | </div>
|
---|
| 1089 | <div class="memdoc">
|
---|
| 1090 |
|
---|
| 1091 | <p>Returns the auto-close flag. </p>
|
---|
| 1092 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#a54bfc924762774ccf9f99be075ba7b0e" title="Sets or unsets the auto-close flag.">setAutoClose()</a> </dd></dl>
|
---|
| 1093 |
|
---|
| 1094 | </div>
|
---|
| 1095 | </div>
|
---|
| 1096 | <a class="anchor" id="a54bfc924762774ccf9f99be075ba7b0e"></a><!-- doxytag: member="QuaZip::setAutoClose" ref="a54bfc924762774ccf9f99be075ba7b0e" args="(bool autoClose) const " -->
|
---|
| 1097 | <div class="memitem">
|
---|
| 1098 | <div class="memproto">
|
---|
| 1099 | <table class="memname">
|
---|
| 1100 | <tr>
|
---|
| 1101 | <td class="memname">void QuaZip::setAutoClose </td>
|
---|
| 1102 | <td>(</td>
|
---|
| 1103 | <td class="paramtype">bool </td>
|
---|
| 1104 | <td class="paramname"><em>autoClose</em></td><td>)</td>
|
---|
| 1105 | <td> const</td>
|
---|
| 1106 | </tr>
|
---|
| 1107 | </table>
|
---|
| 1108 | </div>
|
---|
| 1109 | <div class="memdoc">
|
---|
| 1110 |
|
---|
| 1111 | <p>Sets or unsets the auto-close flag. </p>
|
---|
| 1112 | <p>By default, QuaZIP opens the underlying <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qiodevice.html">QIODevice</a> when <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> is called, and closes it when <a class="el" href="classQuaZip.html#a7a4323b73e12f3b4470109f200728f9f" title="Closes ZIP file.">close()</a> is called. In some cases, when the device is set explicitly using <a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a>, it may be desirable to leave the device open. If the auto-close flag is unset using this method, then the device isn't closed automatically if it was set explicitly.</p>
|
---|
| 1113 | <p>If it is needed to clear this flag, it is recommended to do so before opening the archive because otherwise QuaZIP may close the device during the <a class="el" href="classQuaZip.html#abfa4e6018b2964a3d10a4c54e5ab3962" title="Opens ZIP file.">open()</a> call if an error is encountered after the device is opened.</p>
|
---|
| 1114 | <p>If the device was not set explicitly, but rather the <a class="el" href="classQuaZip.html#aa80b661de1262af905d1677dbcb008cc" title="Sets the name of the ZIP file.">setZipName()</a> or the appropriate constructor was used to set the ZIP file name instead, then the auto-close flag has no effect, and the internal device is closed nevertheless because there is no other way to close it.</p>
|
---|
| 1115 | <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classQuaZip.html#adc2cc762ab5744720ae4d33290b5f5bf" title="Returns the auto-close flag.">isAutoClose()</a> </dd>
|
---|
| 1116 | <dd>
|
---|
| 1117 | <a class="el" href="classQuaZip.html#a64642948b6531ee54f5522f29e388cc6" title="Sets the device representing the ZIP file.">setIoDevice()</a> </dd></dl>
|
---|
| 1118 |
|
---|
| 1119 | </div>
|
---|
| 1120 | </div>
|
---|
| 1121 | <a class="anchor" id="a317f5db89d84a80417338a3ab89770da"></a><!-- doxytag: member="QuaZip::setDefaultFileNameCodec" ref="a317f5db89d84a80417338a3ab89770da" args="(QTextCodec *codec)" -->
|
---|
| 1122 | <div class="memitem">
|
---|
| 1123 | <div class="memproto">
|
---|
| 1124 | <table class="memname">
|
---|
| 1125 | <tr>
|
---|
| 1126 | <td class="memname">void QuaZip::setDefaultFileNameCodec </td>
|
---|
| 1127 | <td>(</td>
|
---|
| 1128 | <td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html">QTextCodec</a> * </td>
|
---|
| 1129 | <td class="paramname"><em>codec</em></td><td>)</td>
|
---|
| 1130 | <td><code> [static]</code></td>
|
---|
| 1131 | </tr>
|
---|
| 1132 | </table>
|
---|
| 1133 | </div>
|
---|
| 1134 | <div class="memdoc">
|
---|
| 1135 |
|
---|
| 1136 | <p>Sets the default file name codec to use. </p>
|
---|
| 1137 | <p>The default codec is used by the constructors, so calling this function won't affect the <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> instances already created at that moment.</p>
|
---|
| 1138 | <p>The codec specified here can be overriden by calling <a class="el" href="classQuaZip.html#a339010b5566704ba3c9cafbfe848d8fb" title="Sets the codec used to encode/decode file names inside archive.">setFileNameCodec()</a>. If neither function is called, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#codecForLocale">QTextCodec::codecForLocale()</a> will be used to decode or encode file names. Use this function with caution if the application uses other libraries that depend on QuaZIP. Those libraries can either call this function by themselves, thus overriding your setting or can rely on the default encoding, thus failing mysteriously if you change it. For these reasons, it isn't recommended to use this function if you are developing a library, not an application. Instead, ask your library users to call it in case they need specific encoding.</p>
|
---|
| 1139 | <p>In most cases, using <a class="el" href="classQuaZip.html#a339010b5566704ba3c9cafbfe848d8fb" title="Sets the codec used to encode/decode file names inside archive.">setFileNameCodec()</a> instead is the right choice. However, if you depend on third-party code that uses QuaZIP, then the reasons stated above can actually become a reason to use this function in case the third-party code in question fails because it doesn't understand the encoding you need and doesn't provide a way to specify it. This applies to the <a class="el" href="classJlCompress.html" title="Utility class for typical operations.">JlCompress</a> class as well, as it was contributed and doesn't support explicit encoding parameters.</p>
|
---|
| 1140 | <p>In short: use <a class="el" href="classQuaZip.html#a339010b5566704ba3c9cafbfe848d8fb" title="Sets the codec used to encode/decode file names inside archive.">setFileNameCodec()</a> when you can, resort to <a class="el" href="classQuaZip.html#a317f5db89d84a80417338a3ab89770da" title="Sets the default file name codec to use.">setDefaultFileNameCodec()</a> when you don't have access to the <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> instance.</p>
|
---|
| 1141 | <dl><dt><b>Parameters:</b></dt><dd>
|
---|
| 1142 | <table class="params">
|
---|
| 1143 | <tr><td class="paramname">codec</td><td>The codec to use by default. If NULL, resets to default. </td></tr>
|
---|
| 1144 | </table>
|
---|
| 1145 | </dd>
|
---|
| 1146 | </dl>
|
---|
| 1147 |
|
---|
| 1148 | <p>Referenced by <a class="el" href="classQuaZip.html#a694af3c0ab076fab7bf619952f6fbfea">setDefaultFileNameCodec()</a>.</p>
|
---|
| 1149 |
|
---|
| 1150 | </div>
|
---|
| 1151 | </div>
|
---|
| 1152 | <a class="anchor" id="a694af3c0ab076fab7bf619952f6fbfea"></a><!-- doxytag: member="QuaZip::setDefaultFileNameCodec" ref="a694af3c0ab076fab7bf619952f6fbfea" args="(const char *codecName)" -->
|
---|
| 1153 | <div class="memitem">
|
---|
| 1154 | <div class="memproto">
|
---|
| 1155 | <table class="memname">
|
---|
| 1156 | <tr>
|
---|
| 1157 | <td class="memname">void QuaZip::setDefaultFileNameCodec </td>
|
---|
| 1158 | <td>(</td>
|
---|
| 1159 | <td class="paramtype">const char * </td>
|
---|
| 1160 | <td class="paramname"><em>codecName</em></td><td>)</td>
|
---|
| 1161 | <td><code> [static]</code></td>
|
---|
| 1162 | </tr>
|
---|
| 1163 | </table>
|
---|
| 1164 | </div>
|
---|
| 1165 | <div class="memdoc">
|
---|
| 1166 | <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Equivalent to calling setDefltFileNameCodec(QTextCodec::codecForName(codecName)). </p>
|
---|
| 1167 |
|
---|
| 1168 | <p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qtextcodec.html#codecForName">QTextCodec::codecForName()</a>, and <a class="el" href="classQuaZip.html#a317f5db89d84a80417338a3ab89770da">setDefaultFileNameCodec()</a>.</p>
|
---|
| 1169 |
|
---|
| 1170 | </div>
|
---|
| 1171 | </div>
|
---|
| 1172 | <hr/>The documentation for this class was generated from the following files:<ul>
|
---|
| 1173 | <li>quazip/<a class="el" href="quazip_8h_source.html">quazip.h</a></li>
|
---|
| 1174 | <li>quazip/quazip.cpp</li>
|
---|
| 1175 | </ul>
|
---|
| 1176 | </div>
|
---|
| 1177 | <hr class="footer"/><address class="footer"><small>Generated on Sun Apr 3 2016 08:26:25 for QuaZIP by 
|
---|
| 1178 | <a href="http://www.doxygen.org/index.html">
|
---|
| 1179 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
---|
| 1180 | </body>
|
---|
| 1181 | </html>
|
---|