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();
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. | |
DWORD | ZipAddFolder (const char *dstzn) |
add a zip folder to the zip file. | |
DWORD | AddDirectory (const char *dstzn, const char *filepattern, int nSubLevel=0) |
add everything in side a directory to the zip. | |
DWORD | close () |
call this when you have finished adding files and folders to the zip file. | |
Public Attributes | |
CZipWriter * | m_writer |
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::ZipAddFolder | ( | const char * | dstzn | ) |
add a zip folder to the zip file.
call this for each folder to be added to the zip.
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.