This class represents a ZIP file being assembled.
More...
#include <qtziphlp.h>
|
virtual bool | open (QIODevice *d, OpenMode mode=OpenTruncate) |
|
virtual void | close () |
|
virtual bool | storeFile (const QString &name, QIODevice &file, const QDateTime &time=QDateTime::currentDateTime()) |
|
virtual bool | storeFile (const QString &name, QByteArray content, const QDateTime &time=QDateTime::currentDateTime()) |
| stores the byte array as a file in the ZIP file, compressing it More...
|
|
virtual bool | storeRawFile (const ZipFileInfo &info, QIODevice &file) |
|
virtual bool | storeRawFile (const ZipFileInfo &info, QByteArray content) |
|
This class represents a ZIP file being assembled.
Defines how the ZIP file is opened.
Enumerator |
---|
OpenTruncate |
Creates a fresh ZIP archive, even if the file exists.
|
OpenAppend |
If the file is new: create it, if it exists: append more files to the existing archive.
|
QtZipHelper::Zip::Zip |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
virtual QtZipHelper::Zip::~Zip |
( |
| ) |
|
|
virtual |
delete the ZIP object and implicitly close it
virtual void QtZipHelper::Zip::close |
( |
| ) |
|
|
virtualslot |
closes the ZIP object (writing headers, trailers, etc.), but does not close the actual QIODevice
bool QtZipHelper::Zip::isOpen |
( |
| ) |
const |
|
virtual |
attached this ZIP object to the given device, does not take ownership of the device, you are responsible for closing or reparenting it
virtual bool QtZipHelper::Zip::storeFile |
( |
const QString & |
name, |
|
|
QIODevice & |
file, |
|
|
const QDateTime & |
time = QDateTime::currentDateTime() |
|
) |
| |
|
virtualslot |
stores the content of the given QIODevice in the ZIP archive, compressing it at the same time, the method assumes that the device is at the correct position to start reading (i.e. if it is a file: you are responsible for seeking to the start first)
virtual bool QtZipHelper::Zip::storeFile |
( |
const QString & |
name, |
|
|
QByteArray |
content, |
|
|
const QDateTime & |
time = QDateTime::currentDateTime() |
|
) |
| |
|
virtualslot |
stores the byte array as a file in the ZIP file, compressing it
virtual bool QtZipHelper::Zip::storeRawFile |
( |
const ZipFileInfo & |
info, |
|
|
QIODevice & |
file |
|
) |
| |
|
virtualslot |
assumes the file is properly compressed and the info object contains the correct information - use this for copying from an Unzip object
virtual bool QtZipHelper::Zip::storeRawFile |
( |
const ZipFileInfo & |
info, |
|
|
QByteArray |
content |
|
) |
| |
|
virtualslot |
assumes the file is properly compressed and the info object contains the correct information - use this for copying from an Unzip object
The documentation for this class was generated from the following file: