#include <ZipFile.h>
List of all members.
Public Member Functions |
| | TZipFile (const TString &rFileName) |
| Retval | addFileEntry (const IString &rEntryName, const IString &rFileName, bool bOverwriteIfExists, Int iZipLevel=4) |
| Retval | deleteFileEntry (Int iIndex) |
| Retval | getFileEntry (Int iIndex, TZippedFileEntry *&rpEntry) const |
| Retval | getFileEntryByName (const IString &rEntryName, TZippedFileEntry *&rpEntry) const |
| Int | getFileEntryCount () const |
| bool | isValid () const |
| Retval | removeFileEntry (const IString &rEntryName) |
| void | createArchive () |
| Retval | saveArchive () |
| void | setPassword (const IString &rPassword) |
| Retval | unzipAllFiles (const IString &rTargetDirectory, bool bOptUsePath=true, bool bOptOverwrite=false) |
| Retval | unzipFiles (const IString &rTargetDirectory, const IStringList &lstEntries, bool bOptUsePath=true, bool bOptOverwrite=false) |
| Retval | unzipSingleFile (const IString &rTargetDirectory, const IString &rFileEntry, bool bOptUsePath=true, bool bOptOverwrite=false) |
| Retval | zipFiles (const IString &rSourceDirectory, bool bRecursive, bool bOverwriteIfExists, Int iZipLevel=4) |
| Retval | zipFiles (const IString &rSourceDirectory, const IString &rFileFilter, bool bRecursive, bool bOverwriteIfExists, Int iZipLevel=4) |
Protected Member Functions |
| virtual | ~TZipFile () |
| void | checkOpen () const |
| void | close () |
Detailed Description
This class represents a zip file. Reading and writing zip files can be done using the provided methods
Constructor & Destructor Documentation
| TZipFile::TZipFile |
( |
const TString & |
rFileName ) |
|
| TZipFile::~TZipFile |
( |
) |
[protected, virtual] |
Member Function Documentation
| Retval TZipFile::addFileEntry |
( |
const IString & |
rEntryName, |
|
|
const IString & |
rFileName, |
|
|
bool |
bOverwriteIfExists, |
|
|
Int |
iZipLevel = 4 |
|
) |
| |
| void TZipFile::checkOpen |
( |
) |
const [protected] |
Opens the Zip file if it is not open yet
| void TZipFile::close |
( |
) |
[protected] |
| void TZipFile::createArchive |
( |
) |
|
creates a new archive. Use saveArchive to store the new archive back to the HD
| Retval TZipFile::deleteFileEntry |
( |
Int |
iIndex ) |
|
| Int TZipFile::getFileEntryCount |
( |
) |
const |
| bool TZipFile::isValid |
( |
) |
const |
| Retval TZipFile::removeFileEntry |
( |
const IString & |
rEntryName ) |
|
| Retval TZipFile::saveArchive |
( |
) |
|
| void zeus::TZipFile::setPassword |
( |
const IString & |
rPassword ) |
[inline] |
sets the password of the zip file
| Retval TZipFile::unzipAllFiles |
( |
const IString & |
rTargetDirectory, |
|
|
bool |
bOptUsePath = true, |
|
|
bool |
bOptOverwrite = false |
|
) |
| |
unzips a file without any password
| Retval TZipFile::unzipFiles |
( |
const IString & |
rTargetDirectory, |
|
|
const IStringList & |
lstEntries, |
|
|
bool |
bOptUsePath = true, |
|
|
bool |
bOptOverwrite = false |
|
) |
| |
Unzips all files of the zip into a directory
- Parameters:
-
| rTargetDirectory,: | target directory |
| lstEntries | : list of file entries to extract |
| bOptUsePath | : should the internal path be used for extraction |
| bOptOverwrite,: | should already existing file be overwritten |
- Return values:
-
| RET_NOERROR | : File unzipped |
| RET_REQUEST_FAILED | : error opening the zip file |
| RET_INVALID_DATA | : Invalid directory |
| RET_ACCESS_DENIED | : Could not create the directory |
ptrEntry->isDirectory()
| Retval zeus::TZipFile::unzipSingleFile |
( |
const IString & |
rTargetDirectory, |
|
|
const IString & |
rFileEntry, |
|
|
bool |
bOptUsePath = true, |
|
|
bool |
bOptOverwrite = false |
|
) |
| [inline] |
| Retval TZipFile::zipFiles |
( |
const IString & |
rSourceDirectory, |
|
|
const IString & |
rFileFilter, |
|
|
bool |
bRecursive, |
|
|
bool |
bOverwriteIfExists, |
|
|
Int |
iZipLevel = 4 |
|
) |
| |
Zips all files of a directory
- Parameters:
-
| rSourceDirectory | : source directory |
| rFileFilter | : File filter, can contain wildcards. |
| bRecursive | : includes all sub directories if true |
| bOverwriteIfExists | : if an entry already exists, it will be overwritten (=true) |
| iZipLevel | : compression level (default is 4) |
- Return values:
-
| RET_REQUEST_FAILED | : Invalid directory |
| RET_NOERROR | : zip created |
| Retval zeus::TZipFile::zipFiles |
( |
const IString & |
rSourceDirectory, |
|
|
bool |
bRecursive, |
|
|
bool |
bOverwriteIfExists, |
|
|
Int |
iZipLevel = 4 |
|
) |
| [inline] |
Zips all files of a directory
- Parameters:
-
| rSourceDirectory | : source directory |
| bRecursive | : includes all sub directories if true |
| bOverwriteIfExists | : if an entry already exists, it will be overwritten (=true) |
| iZipLevel | : compression level (default is 4) |
- Return values:
-
| RET_REQUEST_FAILED | : Invalid directory |
| RET_NOERROR | : zip created |
The documentation for this class was generated from the following files: