Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
QMiniZip Class Reference

#include <qminizip.h>

List of all members.

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

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
ZIP_CREATE 
ZIP_APPEND 
UNZIP 

Definition at line 60 of file qminizip.h.


Constructor & Destructor Documentation

QMiniZip::QMiniZip ( QString  zipfile_,
OpenMode  mode_ 
)

Definition at line 57 of file qminizip.cpp.

Definition at line 71 of file qminizip.cpp.


Member Function Documentation

void QMiniZip::addFile ( const QFileInfo &  fileInfo,
const QString &  nameInZip = "" 
)

Add a file to the zip archive.

Parameters:
fileInfothe file to add
nameInZipoptional: 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.

Parameters:
target_path
Returns:
the list of filenames that was unzipped

Definition at line 134 of file qminizip.cpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:


re_object_recorder
Author(s): Andreas Koch
autogenerated on Sun Jan 5 2014 11:39:13