11#include "kzipfileentry.h"
39 Q_DECLARE_TR_FUNCTIONS(
KZip)
48 KZip(
const QString &filename);
71 DefaultExtraField = 1,
94 DeflateCompression = 1,
123 const QString &target,
125 const QString &group,
127 const QDateTime &atime,
128 const QDateTime &mtime,
129 const QDateTime &ctime)
override;
133 const QString &group,
136 const QDateTime &atime,
137 const QDateTime &mtime,
138 const QDateTime &creationTime)
override;
161 const QString &group,
163 const QDateTime &atime,
164 const QDateTime &mtime,
165 const QDateTime &ctime)
override;
168 void virtual_hook(
int id,
void *data)
override;
172 KZipPrivate *
const d;
KArchive is a base class for reading and writing archives.
Definition karchive.h:40
A KZipFileEntry represents a file in a zip archive.
Definition kzipfileentry.h:19
A class for reading / writing zip archives.
Definition kzip.h:38
bool openArchive(QIODevice::OpenMode mode) override
Opens the archive for reading.
bool doWriteDir(const QString &name, const QString &user, const QString &group, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override
Reimplemented from KArchive.
void setCompression(Compression c)
Call this before writeFile or prepareWriting, to define whether the next files to be written should b...
ExtraField
Describes the contents of the "extra field" for a given file in the Zip archive.
Definition kzip.h:68
KZip(QIODevice *dev)
Creates an instance that operates on the given device.
bool doPrepareWriting(const QString &name, const QString &user, const QString &group, qint64 size, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &creationTime) override
Reimplemented from KArchive.
void setExtraField(ExtraField ef)
Call this before writeFile or prepareWriting, to define what the next file to be written should have ...
KZip(const QString &filename)
Creates an instance that operates on the given filename.
bool doFinishWriting(qint64 size) override
Write data to a file that has been created using prepareWriting().
~KZip() override
If the zip file is still opened, then it will be closed automatically by the destructor.
bool closeArchive() override
Closes the archive.
bool writeData(const char *data, qint64 size) override
Write data to a file that has been created using prepareWriting().
Compression
Describes the compression type for a given file in the Zip archive.
Definition kzip.h:92
bool doWriteSymLink(const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override
Reimplemented from KArchive.
ExtraField extraField() const
The current type of "extra field" that will be used for new files.
Compression compression() const
The current compression mode that will be used for new files.