#include <qminizip.h>
Public Types | |
| enum | OpenMode { ZIP_CREATE, ZIP_APPEND, UNZIP } |
Public Member Functions | |
| void | addFile (const QFileInfo &fileInfo, const QString &nameInZip="") |
| QStringList | getContents () |
| QByteArray | getFile (const QString &filename) |
| QMiniZip (QString zipfile_, OpenMode mode_) | |
| QStringList | unzip (QDir target_path) |
| ~QMiniZip () | |
Protected Member Functions | |
| QString | do_extract_currentfile (const QDir &target_dir) |
Protected Attributes | |
| OpenMode | mode |
| void * | uf |
| void * | zf |
| QFileInfo | zipFileInfo |
A simple utility class to create and extract ZIP files. It is based on Minizip by Gilles Vollant.
Definition at line 57 of file qminizip.h.
| enum QMiniZip::OpenMode |
Definition at line 60 of file qminizip.h.
| QMiniZip::QMiniZip | ( | QString | zipfile_, |
| OpenMode | mode_ | ||
| ) |
Definition at line 57 of file qminizip.cpp.
Definition at line 71 of file qminizip.cpp.
| void QMiniZip::addFile | ( | const QFileInfo & | fileInfo, |
| const QString & | nameInZip = "" |
||
| ) |
Add a file to the zip archive.
| fileInfo | the file to add |
| nameInZip | optional: the name of the file in the zip archive |
Definition at line 80 of file qminizip.cpp.
| QString QMiniZip::do_extract_currentfile | ( | const QDir & | target_dir | ) | [protected] |
Definition at line 168 of file qminizip.cpp.
| QStringList QMiniZip::getContents | ( | ) |
Gets the contents of the current zip file.
Definition at line 285 of file qminizip.cpp.
| QByteArray QMiniZip::getFile | ( | const QString & | filename | ) |
Definition at line 229 of file qminizip.cpp.
| QStringList QMiniZip::unzip | ( | QDir | target_path | ) |
Unzips the contents of the zip archive in the given path.
| target_path |
Definition at line 134 of file qminizip.cpp.
OpenMode QMiniZip::mode [protected] |
Definition at line 89 of file qminizip.h.
void* QMiniZip::uf [protected] |
Definition at line 91 of file qminizip.h.
void* QMiniZip::zf [protected] |
Definition at line 90 of file qminizip.h.
QFileInfo QMiniZip::zipFileInfo [protected] |
Definition at line 87 of file qminizip.h.