source: Vago/Libs/quazip-0.7.2/doc/html/structQuaZipNewInfo.html@ 1089

Last change on this file since 1089 was 1050, checked in by s10k, 8 years ago
File size: 39.0 KB
Line 
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: QuaZipNewInfo Struct 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&#160;<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&#160;Page</span></a></li>
26 <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
35 <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
36 <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
37 </ul>
38 </div>
39</div>
40<div class="header">
41 <div class="summary">
42<a href="#pub-methods">Public Member Functions</a> &#124;
43<a href="#pub-attribs">Public Attributes</a> </div>
44 <div class="headertitle">
45<div class="title">QuaZipNewInfo Struct Reference</div> </div>
46</div>
47<div class="contents">
48<!-- doxytag: class="QuaZipNewInfo" -->
49<p>Information about a file to be created.
50 <a href="structQuaZipNewInfo.html#details">More...</a></p>
51
52<p><code>#include &lt;<a class="el" href="quazipnewinfo_8h_source.html">quazipnewinfo.h</a>&gt;</code></p>
53<div class="dynheader">
54Collaboration diagram for QuaZipNewInfo:</div>
55<div class="dyncontent">
56<div class="center"><img src="structQuaZipNewInfo__coll__graph.png" border="0" usemap="#QuaZipNewInfo_coll__map" alt="Collaboration graph"/></div>
57<map name="QuaZipNewInfo_coll__map" id="QuaZipNewInfo_coll__map">
58<area shape="rect" id="node2" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html" title="QDateTime" alt="" coords="5,5,91,32"/>
59<area shape="rect" id="node4" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html" title="QString" alt="" coords="116,5,183,32"/>
60<area shape="rect" id="node6" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html" title="QByteArray" alt="" coords="207,5,297,32"/>
61</map>
62<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
63
64<p><a href="structQuaZipNewInfo-members.html">List of all members.</a></p>
65<table class="memberdecls">
66<tr><td colspan="2"><h2><a name="pub-methods"></a>
67Public Member Functions</h2></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a46c0f551cf9e6b2131929beb39187aac">QuaZipNewInfo</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> &amp;<a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a>)</td></tr>
69<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. <a href="#a46c0f551cf9e6b2131929beb39187aac"></a><br/></td></tr>
70<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9">QuaZipNewInfo</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> &amp;<a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</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> &amp;file)</td></tr>
71<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. <a href="#ad47cf11f4277edcb09a8ba2b2963f2a9"></a><br/></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a5f1a867f3b0d29d076f9014f70b59e5a">QuaZipNewInfo</a> (const <a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> &amp;existing)</td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the new instance from existing file info. <a href="#a5f1a867f3b0d29d076f9014f70b59e5a"></a><br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a4afa2e8c282a801fc216f79026c2d062">QuaZipNewInfo</a> (const <a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> &amp;existing)</td></tr>
75<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the new instance from existing file info. <a href="#a4afa2e8c282a801fc216f79026c2d062"></a><br/></td></tr>
76<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85">setFileDateTime</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> &amp;file)</td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file timestamp from the existing file. <a href="#a2b18b554d056877a2f33ffb9d241ed85"></a><br/></td></tr>
78<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a08bee5211eb0b49da260c7a9e7a266b8">setFilePermissions</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> &amp;file)</td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file permissions from the existing file. <a href="#a08bee5211eb0b49da260c7a9e7a266b8"></a><br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#aed68dc20f7dc42b5056491cf3c1d2d20">setPermissions</a> (<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfiledevice.html#Permission-enum">QFile::Permissions</a> permissions)</td></tr>
81<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file permissions. <a href="#aed68dc20f7dc42b5056491cf3c1d2d20"></a><br/></td></tr>
82<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a663a37c5a7a2d18900ba8b0199617eff">setFileNTFSTimes</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> &amp;fileName)</td></tr>
83<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NTFS times from an existing file. <a href="#a663a37c5a7a2d18900ba8b0199617eff"></a><br/></td></tr>
84<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a3af07365df1d67502ab1d0ca0d45df79">setFileNTFSmTime</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;mTime, int fineTicks=0)</td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NTFS modification time. <a href="#a3af07365df1d67502ab1d0ca0d45df79"></a><br/></td></tr>
86<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a1042ac3d55a9deed760eb357aaa8284c">setFileNTFSaTime</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;aTime, int fineTicks=0)</td></tr>
87<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NTFS access time. <a href="#a1042ac3d55a9deed760eb357aaa8284c"></a><br/></td></tr>
88<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a44675ac1e306eddefcaa35972c294d15">setFileNTFScTime</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;cTime, int fineTicks=0)</td></tr>
89<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NTFS creation time. <a href="#a44675ac1e306eddefcaa35972c294d15"></a><br/></td></tr>
90<tr><td colspan="2"><h2><a name="pub-attribs"></a>
91Public Attributes</h2></td></tr>
92<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>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a></td></tr>
93<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File name. <a href="#a2bdef01b6ac3326e48598e32bfa5fbe8"></a><br/></td></tr>
94<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/qdatetime.html">QDateTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a></td></tr>
95<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File timestamp. <a href="#aec7f3ac72c72a2e10b82ad64c2fa3453"></a><br/></td></tr>
96<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59ce9776c2ac7547ade8cb4c404c77ab"></a><!-- doxytag: member="QuaZipNewInfo::internalAttr" ref="a59ce9776c2ac7547ade8cb4c404c77ab" args="" -->
97quint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a59ce9776c2ac7547ade8cb4c404c77ab">internalAttr</a></td></tr>
98<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File internal attributes. <br/></td></tr>
99<tr><td class="memItemLeft" align="right" valign="top">quint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#affd1a9700d302e1395bd04f0864da7d0">externalAttr</a></td></tr>
100<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File external attributes. <a href="#affd1a9700d302e1395bd04f0864da7d0"></a><br/></td></tr>
101<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>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ae24b1d38c3550b4724862ffcf8f20924">comment</a></td></tr>
102<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File comment. <a href="#ae24b1d38c3550b4724862ffcf8f20924"></a><br/></td></tr>
103<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab377a81c51cf495c7aeee4f19340a43f"></a><!-- doxytag: member="QuaZipNewInfo::extraLocal" ref="ab377a81c51cf495c7aeee4f19340a43f" args="" -->
104<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#ab377a81c51cf495c7aeee4f19340a43f">extraLocal</a></td></tr>
105<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File local extra field. <br/></td></tr>
106<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abda207eb3949db3a88761c1b06e6bd58"></a><!-- doxytag: member="QuaZipNewInfo::extraGlobal" ref="abda207eb3949db3a88761c1b06e6bd58" args="" -->
107<a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#abda207eb3949db3a88761c1b06e6bd58">extraGlobal</a></td></tr>
108<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">File global extra field. <br/></td></tr>
109<tr><td class="memItemLeft" align="right" valign="top">ulong&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structQuaZipNewInfo.html#a18c079b3f2f5ab6eecdd61d6dbe93be6">uncompressedSize</a></td></tr>
110<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed file size. <a href="#a18c079b3f2f5ab6eecdd61d6dbe93be6"></a><br/></td></tr>
111</table>
112<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
113<div class="textblock"><p>Information about a file to be created. </p>
114<p>This structure holds information about a file to be created inside ZIP archive. At least name should be set to something correct before passing this structure to QuaZipFile::open(OpenMode,const QuaZipNewInfo&amp;,int,int,bool).</p>
115<p>Zip64 support of this structure is slightly limited: in the raw mode (when a pre-compressed file is written into a ZIP file as-is), it is necessary to specify the uncompressed file size and the appropriate field is 32 bit. Since the raw mode is used extremely rare, there is no real need to have a separate QuaZipNewInfo64 structure like <a class="el" href="structQuaZipFileInfo64.html" title="Information about a file inside archive (with zip64 support).">QuaZipFileInfo64</a>. It may be added in the future though, if there is a demand for the raw mode with zip64 archives. </p>
116</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
117<a class="anchor" id="a46c0f551cf9e6b2131929beb39187aac"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="a46c0f551cf9e6b2131929beb39187aac" args="(const QString &amp;name)" -->
118<div class="memitem">
119<div class="memproto">
120 <table class="memname">
121 <tr>
122 <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
123 <td>(</td>
124 <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> &amp;&#160;</td>
125 <td class="paramname"><em>name</em></td><td>)</td>
126 <td></td>
127 </tr>
128 </table>
129</div>
130<div class="memdoc">
131
132<p>Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. </p>
133<p>Initializes name with <em>name</em>, dateTime with current date and time. Attributes are initialized with zeros, comment and extra field with null values. </p>
134
135</div>
136</div>
137<a class="anchor" id="ad47cf11f4277edcb09a8ba2b2963f2a9"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="ad47cf11f4277edcb09a8ba2b2963f2a9" args="(const QString &amp;name, const QString &amp;file)" -->
138<div class="memitem">
139<div class="memproto">
140 <table class="memname">
141 <tr>
142 <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
143 <td>(</td>
144 <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> &amp;&#160;</td>
145 <td class="paramname"><em>name</em>, </td>
146 </tr>
147 <tr>
148 <td class="paramkey"></td>
149 <td></td>
150 <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> &amp;&#160;</td>
151 <td class="paramname"><em>file</em>&#160;</td>
152 </tr>
153 <tr>
154 <td></td>
155 <td>)</td>
156 <td></td><td></td>
157 </tr>
158 </table>
159</div>
160<div class="memdoc">
161
162<p>Constructs <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> instance. </p>
163<p>Initializes name with <em>name</em>. Timestamp and permissions are taken from the specified file. If the <em>file</em> does not exists or its timestamp is inaccessible (e. g. you do not have read permission for the directory file in), uses current time and zero permissions. Other attributes are initialized with zeros, comment and extra field with null values.</p>
164<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85" title="Sets the file timestamp from the existing file.">setFileDateTime()</a> </dd></dl>
165
166<p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html#currentDateTime">QDateTime::currentDateTime()</a>, <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#exists">QFileInfo::exists()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#isDir">QFileInfo::isDir()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastModified">QFileInfo::lastModified()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#permissions">QFileInfo::permissions()</a>.</p>
167
168</div>
169</div>
170<a class="anchor" id="a5f1a867f3b0d29d076f9014f70b59e5a"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="a5f1a867f3b0d29d076f9014f70b59e5a" args="(const QuaZipFileInfo &amp;existing)" -->
171<div class="memitem">
172<div class="memproto">
173 <table class="memname">
174 <tr>
175 <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
176 <td>(</td>
177 <td class="paramtype">const <a class="el" href="structQuaZipFileInfo.html">QuaZipFileInfo</a> &amp;&#160;</td>
178 <td class="paramname"><em>existing</em></td><td>)</td>
179 <td></td>
180 </tr>
181 </table>
182</div>
183<div class="memdoc">
184
185<p>Initializes the new instance from existing file info. </p>
186<p>Mainly used when copying files between archives.</p>
187<p>Both extra fields are initialized to existing.extra. <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> </p>
188<dl><dt><b>Parameters:</b></dt><dd>
189 <table class="params">
190 <tr><td class="paramname">existing</td><td></td></tr>
191 </table>
192 </dd>
193</dl>
194
195</div>
196</div>
197<a class="anchor" id="a4afa2e8c282a801fc216f79026c2d062"></a><!-- doxytag: member="QuaZipNewInfo::QuaZipNewInfo" ref="a4afa2e8c282a801fc216f79026c2d062" args="(const QuaZipFileInfo64 &amp;existing)" -->
198<div class="memitem">
199<div class="memproto">
200 <table class="memname">
201 <tr>
202 <td class="memname">QuaZipNewInfo::QuaZipNewInfo </td>
203 <td>(</td>
204 <td class="paramtype">const <a class="el" href="structQuaZipFileInfo64.html">QuaZipFileInfo64</a> &amp;&#160;</td>
205 <td class="paramname"><em>existing</em></td><td>)</td>
206 <td></td>
207 </tr>
208 </table>
209</div>
210<div class="memdoc">
211
212<p>Initializes the new instance from existing file info. </p>
213<p>Mainly used when copying files between archives.</p>
214<p>Both extra fields are initialized to existing.extra. <a class="el" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> </p>
215<dl><dt><b>Parameters:</b></dt><dd>
216 <table class="params">
217 <tr><td class="paramname">existing</td><td></td></tr>
218 </table>
219 </dd>
220</dl>
221
222</div>
223</div>
224<hr/><h2>Member Function Documentation</h2>
225<a class="anchor" id="a2b18b554d056877a2f33ffb9d241ed85"></a><!-- doxytag: member="QuaZipNewInfo::setFileDateTime" ref="a2b18b554d056877a2f33ffb9d241ed85" args="(const QString &amp;file)" -->
226<div class="memitem">
227<div class="memproto">
228 <table class="memname">
229 <tr>
230 <td class="memname">void QuaZipNewInfo::setFileDateTime </td>
231 <td>(</td>
232 <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> &amp;&#160;</td>
233 <td class="paramname"><em>file</em></td><td>)</td>
234 <td></td>
235 </tr>
236 </table>
237</div>
238<div class="memdoc">
239
240<p>Sets the file timestamp from the existing file. </p>
241<p>Use this function to set the file timestamp from the existing file. Use it like this: </p>
242<div class="fragment"><pre class="fragment"> <a class="code" href="classQuaZipFile.html" title="A file inside ZIP archive.">QuaZipFile</a> zipFile(&amp;zip);
243 <a class="codeRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfile.html">QFile</a> file(<span class="stringliteral">&quot;file-to-add&quot;</span>);
244 file.open(QIODevice::ReadOnly);
245 <a class="code" href="structQuaZipNewInfo.html" title="Information about a file to be created.">QuaZipNewInfo</a> info(<span class="stringliteral">&quot;file-name-in-archive&quot;</span>);
246 info.setFileDateTime(<span class="stringliteral">&quot;file-to-add&quot;</span>); <span class="comment">// take the timestamp from file</span>
247 zipFile.open(QIODevice::WriteOnly, info);
248</pre></div><p>This function does not change dateTime if some error occured (e. g. file is inaccessible). </p>
249
250<p>References <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">dateTime</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#exists">QFileInfo::exists()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastModified">QFileInfo::lastModified()</a>.</p>
251
252</div>
253</div>
254<a class="anchor" id="a08bee5211eb0b49da260c7a9e7a266b8"></a><!-- doxytag: member="QuaZipNewInfo::setFilePermissions" ref="a08bee5211eb0b49da260c7a9e7a266b8" args="(const QString &amp;file)" -->
255<div class="memitem">
256<div class="memproto">
257 <table class="memname">
258 <tr>
259 <td class="memname">void QuaZipNewInfo::setFilePermissions </td>
260 <td>(</td>
261 <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> &amp;&#160;</td>
262 <td class="paramname"><em>file</em></td><td>)</td>
263 <td></td>
264 </tr>
265 </table>
266</div>
267<div class="memdoc">
268
269<p>Sets the file permissions from the existing file. </p>
270<p>Takes permissions from the file and sets the high 16 bits of external attributes. Uses <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html">QFileInfo</a> to get permissions on all platforms. </p>
271
272<p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#isDir">QFileInfo::isDir()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#permissions">QFileInfo::permissions()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfiledevice.html#Permission-enum">QFileDevice::Permissions</a>.</p>
273
274</div>
275</div>
276<a class="anchor" id="aed68dc20f7dc42b5056491cf3c1d2d20"></a><!-- doxytag: member="QuaZipNewInfo::setPermissions" ref="aed68dc20f7dc42b5056491cf3c1d2d20" args="(QFile::Permissions permissions)" -->
277<div class="memitem">
278<div class="memproto">
279 <table class="memname">
280 <tr>
281 <td class="memname">void QuaZipNewInfo::setPermissions </td>
282 <td>(</td>
283 <td class="paramtype"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfiledevice.html#Permission-enum">QFile::Permissions</a>&#160;</td>
284 <td class="paramname"><em>permissions</em></td><td>)</td>
285 <td></td>
286 </tr>
287 </table>
288</div>
289<div class="memdoc">
290
291<p>Sets the file permissions. </p>
292<p>Modifies the highest 16 bits of external attributes. The type part is set to dir if the name ends with a slash, and to regular file otherwise. </p>
293
294<p>References <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#endsWith">QString::endsWith()</a>, and <a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">name</a>.</p>
295
296</div>
297</div>
298<a class="anchor" id="a663a37c5a7a2d18900ba8b0199617eff"></a><!-- doxytag: member="QuaZipNewInfo::setFileNTFSTimes" ref="a663a37c5a7a2d18900ba8b0199617eff" args="(const QString &amp;fileName)" -->
299<div class="memitem">
300<div class="memproto">
301 <table class="memname">
302 <tr>
303 <td class="memname">void QuaZipNewInfo::setFileNTFSTimes </td>
304 <td>(</td>
305 <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> &amp;&#160;</td>
306 <td class="paramname"><em>fileName</em></td><td>)</td>
307 <td></td>
308 </tr>
309 </table>
310</div>
311<div class="memdoc">
312
313<p>Sets the NTFS times from an existing file. </p>
314<p>If the file doesn't exist, a warning is printed to the stderr and nothing is done. Otherwise, all three times, as reported by <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastModified">QFileInfo::lastModified()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastRead">QFileInfo::lastRead()</a> and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#created">QFileInfo::created()</a>, are written to the NTFS extra field record.</p>
315<p>The NTFS record is written to both the local and the global extra fields, updating the existing record if there is one, or creating a new one and appending it to the end of each extra field.</p>
316<p>The microseconds will be zero, as they aren't reported by <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html">QFileInfo</a>. </p>
317<dl><dt><b>Parameters:</b></dt><dd>
318 <table class="params">
319 <tr><td class="paramname">fileName</td><td></td></tr>
320 </table>
321 </dd>
322</dl>
323
324<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/qfileinfo.html#created">QFileInfo::created()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#exists">QFileInfo::exists()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastModified">QFileInfo::lastModified()</a>, <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qfileinfo.html#lastRead">QFileInfo::lastRead()</a>, <a class="el" href="structQuaZipNewInfo.html#a1042ac3d55a9deed760eb357aaa8284c">setFileNTFSaTime()</a>, <a class="el" href="structQuaZipNewInfo.html#a44675ac1e306eddefcaa35972c294d15">setFileNTFScTime()</a>, <a class="el" href="structQuaZipNewInfo.html#a3af07365df1d67502ab1d0ca0d45df79">setFileNTFSmTime()</a>, and <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html#toUtf8">QString::toUtf8()</a>.</p>
325
326</div>
327</div>
328<a class="anchor" id="a3af07365df1d67502ab1d0ca0d45df79"></a><!-- doxytag: member="QuaZipNewInfo::setFileNTFSmTime" ref="a3af07365df1d67502ab1d0ca0d45df79" args="(const QDateTime &amp;mTime, int fineTicks=0)" -->
329<div class="memitem">
330<div class="memproto">
331 <table class="memname">
332 <tr>
333 <td class="memname">void QuaZipNewInfo::setFileNTFSmTime </td>
334 <td>(</td>
335 <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;&#160;</td>
336 <td class="paramname"><em>mTime</em>, </td>
337 </tr>
338 <tr>
339 <td class="paramkey"></td>
340 <td></td>
341 <td class="paramtype">int&#160;</td>
342 <td class="paramname"><em>fineTicks</em> = <code>0</code>&#160;</td>
343 </tr>
344 <tr>
345 <td></td>
346 <td>)</td>
347 <td></td><td></td>
348 </tr>
349 </table>
350</div>
351<div class="memdoc">
352
353<p>Sets the NTFS modification time. </p>
354<p>The time is written into the NTFS record in both the local and the global extra fields, updating the existing record if there is one, or creating a new one and appending it to the end of each extra field. When updating an existing record, all other fields are left intact. </p>
355<dl><dt><b>Parameters:</b></dt><dd>
356 <table class="params">
357 <tr><td class="paramname">mTime</td><td>The new modification time. </td></tr>
358 <tr><td class="paramname">fineTicks</td><td>The fractional part of milliseconds, in 100-nanosecond ticks (i. e. 9999 ticks = 999.9 microsecond). Values greater than 9999 will add milliseconds or even seconds, but this can be confusing and therefore is discouraged. </td></tr>
359 </table>
360 </dd>
361</dl>
362
363<p>References <a class="el" href="structQuaZipNewInfo.html#abda207eb3949db3a88761c1b06e6bd58">extraGlobal</a>, and <a class="el" href="structQuaZipNewInfo.html#ab377a81c51cf495c7aeee4f19340a43f">extraLocal</a>.</p>
364
365<p>Referenced by <a class="el" href="structQuaZipNewInfo.html#a663a37c5a7a2d18900ba8b0199617eff">setFileNTFSTimes()</a>.</p>
366
367</div>
368</div>
369<a class="anchor" id="a1042ac3d55a9deed760eb357aaa8284c"></a><!-- doxytag: member="QuaZipNewInfo::setFileNTFSaTime" ref="a1042ac3d55a9deed760eb357aaa8284c" args="(const QDateTime &amp;aTime, int fineTicks=0)" -->
370<div class="memitem">
371<div class="memproto">
372 <table class="memname">
373 <tr>
374 <td class="memname">void QuaZipNewInfo::setFileNTFSaTime </td>
375 <td>(</td>
376 <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;&#160;</td>
377 <td class="paramname"><em>aTime</em>, </td>
378 </tr>
379 <tr>
380 <td class="paramkey"></td>
381 <td></td>
382 <td class="paramtype">int&#160;</td>
383 <td class="paramname"><em>fineTicks</em> = <code>0</code>&#160;</td>
384 </tr>
385 <tr>
386 <td></td>
387 <td>)</td>
388 <td></td><td></td>
389 </tr>
390 </table>
391</div>
392<div class="memdoc">
393
394<p>Sets the NTFS access time. </p>
395<p>The time is written into the NTFS record in both the local and the global extra fields, updating the existing record if there is one, or creating a new one and appending it to the end of each extra field. When updating an existing record, all other fields are left intact. </p>
396<dl><dt><b>Parameters:</b></dt><dd>
397 <table class="params">
398 <tr><td class="paramname">aTime</td><td>The new access time. </td></tr>
399 <tr><td class="paramname">fineTicks</td><td>The fractional part of milliseconds, in 100-nanosecond ticks (i. e. 9999 ticks = 999.9 microsecond). Values greater than 9999 will add milliseconds or even seconds, but this can be confusing and therefore is discouraged. </td></tr>
400 </table>
401 </dd>
402</dl>
403
404<p>References <a class="el" href="structQuaZipNewInfo.html#abda207eb3949db3a88761c1b06e6bd58">extraGlobal</a>, and <a class="el" href="structQuaZipNewInfo.html#ab377a81c51cf495c7aeee4f19340a43f">extraLocal</a>.</p>
405
406<p>Referenced by <a class="el" href="structQuaZipNewInfo.html#a663a37c5a7a2d18900ba8b0199617eff">setFileNTFSTimes()</a>.</p>
407
408</div>
409</div>
410<a class="anchor" id="a44675ac1e306eddefcaa35972c294d15"></a><!-- doxytag: member="QuaZipNewInfo::setFileNTFScTime" ref="a44675ac1e306eddefcaa35972c294d15" args="(const QDateTime &amp;cTime, int fineTicks=0)" -->
411<div class="memitem">
412<div class="memproto">
413 <table class="memname">
414 <tr>
415 <td class="memname">void QuaZipNewInfo::setFileNTFScTime </td>
416 <td>(</td>
417 <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> &amp;&#160;</td>
418 <td class="paramname"><em>cTime</em>, </td>
419 </tr>
420 <tr>
421 <td class="paramkey"></td>
422 <td></td>
423 <td class="paramtype">int&#160;</td>
424 <td class="paramname"><em>fineTicks</em> = <code>0</code>&#160;</td>
425 </tr>
426 <tr>
427 <td></td>
428 <td>)</td>
429 <td></td><td></td>
430 </tr>
431 </table>
432</div>
433<div class="memdoc">
434
435<p>Sets the NTFS creation time. </p>
436<p>The time is written into the NTFS record in both the local and the global extra fields, updating the existing record if there is one, or creating a new one and appending it to the end of each extra field. When updating an existing record, all other fields are left intact. </p>
437<dl><dt><b>Parameters:</b></dt><dd>
438 <table class="params">
439 <tr><td class="paramname">cTime</td><td>The new creation time. </td></tr>
440 <tr><td class="paramname">fineTicks</td><td>The fractional part of milliseconds, in 100-nanosecond ticks (i. e. 9999 ticks = 999.9 microsecond). Values greater than 9999 will add milliseconds or even seconds, but this can be confusing and therefore is discouraged. </td></tr>
441 </table>
442 </dd>
443</dl>
444
445<p>References <a class="el" href="structQuaZipNewInfo.html#abda207eb3949db3a88761c1b06e6bd58">extraGlobal</a>, and <a class="el" href="structQuaZipNewInfo.html#ab377a81c51cf495c7aeee4f19340a43f">extraLocal</a>.</p>
446
447<p>Referenced by <a class="el" href="structQuaZipNewInfo.html#a663a37c5a7a2d18900ba8b0199617eff">setFileNTFSTimes()</a>.</p>
448
449</div>
450</div>
451<hr/><h2>Member Data Documentation</h2>
452<a class="anchor" id="a2bdef01b6ac3326e48598e32bfa5fbe8"></a><!-- doxytag: member="QuaZipNewInfo::name" ref="a2bdef01b6ac3326e48598e32bfa5fbe8" args="" -->
453<div class="memitem">
454<div class="memproto">
455 <table class="memname">
456 <tr>
457 <td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qstring.html">QString</a> <a class="el" href="structQuaZipNewInfo.html#a2bdef01b6ac3326e48598e32bfa5fbe8">QuaZipNewInfo::name</a></td>
458 </tr>
459 </table>
460</div>
461<div class="memdoc">
462
463<p>File name. </p>
464<p>This field holds file name inside archive, including path relative to archive root. </p>
465
466<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>, and <a class="el" href="structQuaZipNewInfo.html#aed68dc20f7dc42b5056491cf3c1d2d20">setPermissions()</a>.</p>
467
468</div>
469</div>
470<a class="anchor" id="aec7f3ac72c72a2e10b82ad64c2fa3453"></a><!-- doxytag: member="QuaZipNewInfo::dateTime" ref="aec7f3ac72c72a2e10b82ad64c2fa3453" args="" -->
471<div class="memitem">
472<div class="memproto">
473 <table class="memname">
474 <tr>
475 <td class="memname"><a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qdatetime.html">QDateTime</a> <a class="el" href="structQuaZipNewInfo.html#aec7f3ac72c72a2e10b82ad64c2fa3453">QuaZipNewInfo::dateTime</a></td>
476 </tr>
477 </table>
478</div>
479<div class="memdoc">
480
481<p>File timestamp. </p>
482<p>This is the last file modification date and time. Will be stored in the archive central directory. It is a good practice to set it to the source file timestamp instead of archive creating time. Use <a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85" title="Sets the file timestamp from the existing file.">setFileDateTime()</a> or <a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9" title="Constructs QuaZipNewInfo instance.">QuaZipNewInfo(const QString&amp;, const QString&amp;)</a>. </p>
483
484<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>, <a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9">QuaZipNewInfo()</a>, and <a class="el" href="structQuaZipNewInfo.html#a2b18b554d056877a2f33ffb9d241ed85">setFileDateTime()</a>.</p>
485
486</div>
487</div>
488<a class="anchor" id="affd1a9700d302e1395bd04f0864da7d0"></a><!-- doxytag: member="QuaZipNewInfo::externalAttr" ref="affd1a9700d302e1395bd04f0864da7d0" args="" -->
489<div class="memitem">
490<div class="memproto">
491 <table class="memname">
492 <tr>
493 <td class="memname">quint32 <a class="el" href="structQuaZipNewInfo.html#affd1a9700d302e1395bd04f0864da7d0">QuaZipNewInfo::externalAttr</a></td>
494 </tr>
495 </table>
496</div>
497<div class="memdoc">
498
499<p>File external attributes. </p>
500<p>The highest 16 bits contain Unix file permissions and type (dir or file). The constructor <a class="el" href="structQuaZipNewInfo.html#ad47cf11f4277edcb09a8ba2b2963f2a9" title="Constructs QuaZipNewInfo instance.">QuaZipNewInfo(const QString&amp;, const QString&amp;)</a> takes permissions from the provided file. </p>
501
502<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>
503
504</div>
505</div>
506<a class="anchor" id="ae24b1d38c3550b4724862ffcf8f20924"></a><!-- doxytag: member="QuaZipNewInfo::comment" ref="ae24b1d38c3550b4724862ffcf8f20924" args="" -->
507<div class="memitem">
508<div class="memproto">
509 <table class="memname">
510 <tr>
511 <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> <a class="el" href="structQuaZipNewInfo.html#ae24b1d38c3550b4724862ffcf8f20924">QuaZipNewInfo::comment</a></td>
512 </tr>
513 </table>
514</div>
515<div class="memdoc">
516
517<p>File comment. </p>
518<p>Will be encoded using <a class="el" href="classQuaZip.html#a008260161781d8b5d2a0a28493fddaf4" title="Returns the codec used to encode/decode comments inside archive.">QuaZip::getCommentCodec()</a>. </p>
519
520<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>
521
522</div>
523</div>
524<a class="anchor" id="a18c079b3f2f5ab6eecdd61d6dbe93be6"></a><!-- doxytag: member="QuaZipNewInfo::uncompressedSize" ref="a18c079b3f2f5ab6eecdd61d6dbe93be6" args="" -->
525<div class="memitem">
526<div class="memproto">
527 <table class="memname">
528 <tr>
529 <td class="memname">ulong <a class="el" href="structQuaZipNewInfo.html#a18c079b3f2f5ab6eecdd61d6dbe93be6">QuaZipNewInfo::uncompressedSize</a></td>
530 </tr>
531 </table>
532</div>
533<div class="memdoc">
534
535<p>Uncompressed file size. </p>
536<p>This is only needed if you are using raw file zipping mode, i. e. adding precompressed file in the zip archive. </p>
537
538<p>Referenced by <a class="el" href="classQuaZipFile.html#a2429ea59c77371d7af56d739db130b18">QuaZipFile::open()</a>.</p>
539
540</div>
541</div>
542<hr/>The documentation for this struct was generated from the following files:<ul>
543<li>quazip/<a class="el" href="quazipnewinfo_8h_source.html">quazipnewinfo.h</a></li>
544<li>quazip/quazipnewinfo.cpp</li>
545</ul>
546</div>
547<hr class="footer"/><address class="footer"><small>Generated on Sun Apr 3 2016 08:26:25 for QuaZIP by&#160;
548<a href="http://www.doxygen.org/index.html">
549<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
550</body>
551</html>
Note: See TracBrowser for help on using the repository browser.