1 #ifndef __libquark_zipfile_ZipFile_hxx 2 #define __libquark_zipfile_ZipFile_hxx 40 bool open(QIODevice::OpenMode openMode,
41 const QString &password = QString());
101 bool getEntry(
const QString &path,
ZipEntry &entry,
bool ignoreCase =
false);
142 bool renameEntry(qint64 index,
const QString &newPath);
198 bool addFile(
const QString &path,
const QString &zipPath);
206 void saveErrorString(
int zipError);
208 bool checkReadMode();
209 bool checkWriteMode();
210 void decodeZipEntry(
ZipEntry *entry,
void *stat);
228 #endif // __libquark_zipfile_ZipFile_hxx bool setEntryComment(qint64 index, const QString &comment)
Sets the comment for the entry at the specified index in the Zip archive.
bool isOpen() const
Tests if the Zip archive is currently open.
bool addDirectory(const QString &zipPath)
Adds a directory entry to the Zip archive.
bool removeEntry(qint64 index)
Removes the entry at the specified index from the Zip archive.
QString archiveComment()
Returns the Zip archive's comment.
void closeEntry()
Closes the currently opened entry, if any.
Definition: BarChartView.h++:6
bool extractEntry(const ZipEntry &entry, const QString &outputPath)
Extracts the contents of a file entry from the Zip archive.
A class representing a Zip archive.
Definition: ZipFile.h++:19
bool getEntry(qint64 index, ZipEntry &entry)
Retrieves the entry at the specified index in the Zip archive.
bool addFile(const QString &path, const QString &zipPath)
Adds a file entry to the Zip archive.
bool renameEntry(qint64 index, const QString &newPath)
Changes the file path of the entry at the specified index in the Zip archive.
bool setArchiveComment(const QString &comment)
Sets the Zip archive's comment.
int readEntry(char *buf, int count)
Reads (and decompresses) data from the currently opened entry.
bool open(QIODevice::OpenMode openMode, const QString &password=QString())
Opens the Zip archive.
ZipFile(const QString &file)
Constructs a new ZipFile for the given file path.
virtual ~ZipFile()
Destructor.
QString getEntryComment(qint64 index)
Retrieves the comment for the entry at the specified index in the Zip archive.
bool openEntry(qint64 index)
Opens the entry at the specified index in the Zip archive.
bool close()
Closes the Zip archive.
qint64 numEntries()
Returns the number of entries in the Zip archive.
A class representing an entry in a Zip archive.
Definition: ZipEntry.h++:17
bool isEntryOpen() const
Tests if an entry is currently opened.
QString getEntryPath(qint64 index)
Returns the file path for the entry at the specified index.
QString error() const
Returns the most recently generated Zip error message.
Definition: ZipFile.h++:201