QuaZip quazip-1-4
quazipnewinfo.h
1#ifndef QUA_ZIPNEWINFO_H
2#define QUA_ZIPNEWINFO_H
3
4/*
5Copyright (C) 2005-2014 Sergey A. Tachenov
6
7This file is part of QuaZip.
8
9QuaZip is free software: you can redistribute it and/or modify
10it under the terms of the GNU Lesser General Public License as published by
11the Free Software Foundation, either version 2.1 of the License, or
12(at your option) any later version.
13
14QuaZip is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License
20along with QuaZip. If not, see <http://www.gnu.org/licenses/>.
21
22See COPYING file for the full LGPL text.
23
24Original ZIP package is copyrighted by Gilles Vollant, see
25quazip/(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
50struct 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
99 QuaZipNewInfo(const QString& name, const QString& file);
101
108 QuaZipNewInfo(const QString& name, const QString& file, const QDateTime& dateTime);
110
116 QuaZipNewInfo(const QuaZipFileInfo &existing);
118
124 QuaZipNewInfo(const QuaZipFileInfo64 &existing);
126
140 void setFileDateTime(const QString& file);
142
147 void setFilePermissions(const QString &file);
149
154 void setPermissions(QFile::Permissions permissions);
156
171 void setFileNTFSTimes(const QString &fileName);
173
185 void setFileNTFSmTime(const QDateTime &mTime, int fineTicks = 0);
187
199 void setFileNTFSaTime(const QDateTime &aTime, int fineTicks = 0);
201
213 void setFileNTFScTime(const QDateTime &cTime, int fineTicks = 0);
214};
215
216#endif
Information about a file inside archive (with zip64 support).
Definition quazipfileinfo.h:85
Information about a file inside archive.
Definition quazipfileinfo.h:45
void setFilePermissions(const QString &file)
Sets the file permissions from the existing file.
Definition quazipnewinfo.cpp:125
void setFileNTFSaTime(const QDateTime &aTime, int fineTicks=0)
Sets the NTFS access time.
Definition quazipnewinfo.cpp:275
ulong uncompressedSize
Uncompressed file size.
Definition quazipnewinfo.h:84
void setFileDateTime(const QString &file)
Sets the file timestamp from the existing file.
Definition quazipnewinfo.cpp:117
QString name
File name.
Definition quazipnewinfo.h:55
void setFileNTFSmTime(const QDateTime &mTime, int fineTicks=0)
Sets the NTFS modification time.
Definition quazipnewinfo.cpp:269
void setFileNTFScTime(const QDateTime &cTime, int fineTicks=0)
Sets the NTFS creation time.
Definition quazipnewinfo.cpp:281
QuaZipNewInfo(const QString &name)
Constructs QuaZipNewInfo instance.
Definition quazipnewinfo.cpp:89
quint16 internalAttr
File internal attributes.
Definition quazipnewinfo.h:64
void setFileNTFSTimes(const QString &fileName)
Sets the NTFS times from an existing file.
Definition quazipnewinfo.cpp:137
QByteArray extraLocal
File local extra field.
Definition quazipnewinfo.h:77
QByteArray extraGlobal
File global extra field.
Definition quazipnewinfo.h:79
QString comment
File comment.
Definition quazipnewinfo.h:75
QDateTime dateTime
File timestamp.
Definition quazipnewinfo.h:62
void setPermissions(QFile::Permissions permissions)
Sets the file permissions.
Definition quazipnewinfo.cpp:132
quint32 externalAttr
File external attributes.
Definition quazipnewinfo.h:71