25 #ifndef ZIPHELPER_QTZIPHLP_H
26 #define ZIPHELPER_QTZIPHLP_H
50 bool isValid()
const{
return !mName.isEmpty();}
54 operator bool()
const{
return !mName.isEmpty();}
71 ZipFileInfo(
const QString&,
const QDateTime&,
int,ulong,ulong);
86 explicit Zip(QObject* parent = 0);
102 virtual bool open(QIODevice *d, OpenMode mode=OpenTruncate);
105 virtual void close();
110 virtual bool storeFile(
const QString &name, QIODevice &file,
111 const QDateTime &time = QDateTime::currentDateTime());
113 virtual bool storeFile(
const QString&name, QByteArray content,
114 const QDateTime &time = QDateTime::currentDateTime());
117 virtual bool storeRawFile(
const ZipFileInfo&info, QIODevice &file);
120 virtual bool storeRawFile(
const ZipFileInfo&info, QByteArray content);
129 explicit Unzip(QObject*parent=0);
133 virtual bool isOpen()
const;
137 virtual bool open(QIODevice *d);
140 virtual void close();
142 virtual int fileCount()
const;
148 virtual ZipFileInfo locateFile(
const QString &name, Qt::CaseSensitivity cs = Qt::CaseSensitive);
153 virtual ZipFileInfo currentFile(QIODevice &d)
const;
158 virtual QByteArray currentFileContent()
const;
161 virtual ZipFileInfo currentFileRaw(QIODevice &d)
const;
164 virtual ZipFileInfo currentFileRaw(QByteArray&)
const;
166 virtual QByteArray currentFileRawContent()
const;
168 virtual QString currentFileName()
const;
170 virtual bool copyCurrentFile(
Zip&)
const;
Base class of Zip and Unzip, see those for details.
Definition: qtzipbase.h:39
ulong uncompressedSize() const
returns the uncompressed file size stored for this file
Definition: qtziphlp.h:65
QString fileName() const
returns the file name of the stored file
Definition: qtziphlp.h:57
Definition: qtzipbase.h:37
ulong fileCRC() const
returns the CRC32 stored for this file
Definition: qtziphlp.h:63
#define ZIPHLP_EXPORT
Definition: qtzipbase.h:34
bool isValid() const
returns true if this is a valid info object
Definition: qtziphlp.h:50
QDateTime createTime() const
returns the creation time of the file stored in the ZIP
Definition: qtziphlp.h:59
This class represents a ZIP file being assembled.
Definition: qtziphlp.h:80
Helper class: reports information about a specific file entry in the ZIP archive. ...
Definition: qtziphlp.h:39
int rawCompressionMethod() const
returns the code of the compression method used with this file
Definition: qtziphlp.h:61
This class represents a ZIP file being read.
Definition: qtziphlp.h:124
OpenMode
Defines how the ZIP file is opened.
Definition: qtziphlp.h:91