|
My Project
|
ParaZipWriter class: creating zip files. More...
#include <ParaScriptingIO.h>
Public Member Functions | |
| ParaZipWriter (CZipWriter *writer) | |
| bool | IsValid () |
| whether it is valid | |
| DWORD | ZipAdd (const char *dstzn, const char *fn) |
| add a zip file to the zip. More... | |
| DWORD | ZipAddData (const char *dstzn, const std::string &buff) |
| add a data to the zip. More... | |
| DWORD | ZipAddFolder (const char *dstzn) |
| add a zip folder to the zip file. More... | |
| DWORD | AddDirectory (const char *dstzn, const char *filepattern, int nSubLevel=0) |
| add everything in side a directory to the zip. More... | |
| DWORD | close () |
| call this when you have finished adding files and folders to the zip file. More... | |
Public Attributes | |
| ref_ptr< CZipWriter > | m_writer |
ParaZipWriter class: creating zip files.
e.g. (1) Traditional use, creating a zipfile from existing files local writer = ParaIO.CreateZip("c:\\simple1.zip",""); writer:ZipAdd("znsimple.bmp", "c:\\simple.bmp"); writer:ZipAdd("znsimple.txt", "c:\\simple.txt"); writer:close();
| DWORD ParaScripting::ParaZipWriter::AddDirectory | ( | const char * | dstzn, |
| const char * | filepattern, | ||
| int | nSubLevel = 0 |
||
| ) |
add everything in side a directory to the zip.
e.g. AddDirectory("myworld/", "worlds/myworld/ *.*", 10);
| dstzn | all files in fn will be appended with this string to be saved in the zip file. |
| filepattern | file patterns, which can include wild characters in the file portion. |
| nSubLevel | sub directory levels. 0 means only files at parent directory. |
| DWORD ParaScripting::ParaZipWriter::close | ( | ) |
call this when you have finished adding files and folders to the zip file.
Note: you can't add any more after calling this.
| DWORD ParaScripting::ParaZipWriter::ZipAdd | ( | const char * | dstzn, |
| const char * | fn | ||
| ) |
add a zip file to the zip.
file call this for each file to be added to the zip.
| DWORD ParaScripting::ParaZipWriter::ZipAddData | ( | const char * | dstzn, |
| const std::string & | buff | ||
| ) |
add a data to the zip.
| DWORD ParaScripting::ParaZipWriter::ZipAddFolder | ( | const char * | dstzn | ) |
add a zip folder to the zip file.
call this for each folder to be added to the zip.
1.8.12