QuaZIP  quazip-0-9
quazipnewinfo.h
1 #ifndef QUA_ZIPNEWINFO_H
2 #define QUA_ZIPNEWINFO_H
3 
4 /*
5 Copyright (C) 2005-2014 Sergey A. Tachenov
6 
7 This file is part of QuaZIP.
8 
9 QuaZIP is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 2.1 of the License, or
12 (at your option) any later version.
13 
14 QuaZIP is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public License
20 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
21 
22 See COPYING file for the full LGPL text.
23 
24 Original ZIP package is copyrighted by Gilles Vollant, see
25 quazip/(un)zip.h files for details, basically it's zlib license.
26  **/
27 
28 #include <QtCore/QDateTime>
29 #include <QtCore/QFile>
30 #include <QtCore/QString>
31 
32 #include "quazip_global.h"
33 
34 #include "quazipfileinfo.h"
35 
37 
50 struct QUAZIP_EXPORT QuaZipNewInfo {
52 
55  QString name;
57 
62  QDateTime dateTime;
64  quint16 internalAttr;
66 
71  quint32 externalAttr;
73 
75  QString comment;
77  QByteArray extraLocal;
79  QByteArray extraGlobal;
81 
86 
90  QuaZipNewInfo(const QString& name);
92 
100  QuaZipNewInfo(const QString& name, const QString& file);
102 
108  QuaZipNewInfo(const QuaZipFileInfo &existing);
110 
116  QuaZipNewInfo(const QuaZipFileInfo64 &existing);
118 
132  void setFileDateTime(const QString& file);
134 
139  void setFilePermissions(const QString &file);
141 
146  void setPermissions(QFile::Permissions permissions);
148 
163  void setFileNTFSTimes(const QString &fileName);
165 
177  void setFileNTFSmTime(const QDateTime &mTime, int fineTicks = 0);
179 
191  void setFileNTFSaTime(const QDateTime &aTime, int fineTicks = 0);
193 
205  void setFileNTFScTime(const QDateTime &cTime, int fineTicks = 0);
206 };
207 
208 #endif
QuaZipNewInfo::setFileNTFScTime
void setFileNTFScTime(const QDateTime &cTime, int fineTicks=0)
Sets the NTFS creation time.
Definition: quazipnewinfo.cpp:286
QuaZipNewInfo::uncompressedSize
ulong uncompressedSize
Uncompressed file size.
Definition: quazipnewinfo.h:84
QuaZipNewInfo::setPermissions
void setPermissions(QFile::Permissions permissions)
Sets the file permissions.
Definition: quazipnewinfo.cpp:122
QuaZipNewInfo::internalAttr
quint16 internalAttr
File internal attributes.
Definition: quazipnewinfo.h:64
QuaZipNewInfo::extraLocal
QByteArray extraLocal
File local extra field.
Definition: quazipnewinfo.h:77
QuaZipNewInfo::comment
QString comment
File comment.
Definition: quazipnewinfo.h:75
QuaZipFileInfo
Information about a file inside archive.
Definition: quazipfileinfo.h:45
QuaZipNewInfo::extraGlobal
QByteArray extraGlobal
File global extra field.
Definition: quazipnewinfo.h:79
QuaZipNewInfo::QuaZipNewInfo
QuaZipNewInfo(const QString &name)
Constructs QuaZipNewInfo instance.
Definition: quazipnewinfo.cpp:88
QuaZipNewInfo::name
QString name
File name.
Definition: quazipnewinfo.h:55
QuaZipNewInfo::externalAttr
quint32 externalAttr
File external attributes.
Definition: quazipnewinfo.h:71
QuaZipNewInfo::dateTime
QDateTime dateTime
File timestamp.
Definition: quazipnewinfo.h:62
QuaZipNewInfo::setFileNTFSTimes
void setFileNTFSTimes(const QString &fileName)
Sets the NTFS times from an existing file.
Definition: quazipnewinfo.cpp:127
QuaZipNewInfo::setFilePermissions
void setFilePermissions(const QString &file)
Sets the file permissions from the existing file.
Definition: quazipnewinfo.cpp:115
QuaZipFileInfo64
Information about a file inside archive (with zip64 support).
Definition: quazipfileinfo.h:85
QuaZipNewInfo
Information about a file to be created.
Definition: quazipnewinfo.h:50
QuaZipNewInfo::setFileNTFSaTime
void setFileNTFSaTime(const QDateTime &aTime, int fineTicks=0)
Sets the NTFS access time.
Definition: quazipnewinfo.cpp:280
QuaZipNewInfo::setFileNTFSmTime
void setFileNTFSmTime(const QDateTime &mTime, int fineTicks=0)
Sets the NTFS modification time.
Definition: quazipnewinfo.cpp:274
QuaZipNewInfo::setFileDateTime
void setFileDateTime(const QString &file)
Sets the file timestamp from the existing file.
Definition: quazipnewinfo.cpp:107