ParaScripting::ParaZipWriter Class Reference
[ParaIO]

List of all members.

Detailed Description

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();


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


Member Function Documentation

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.

Returns:
: 0 if succeed.

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.

Returns:
: 0 if succeed.

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);

Parameters:
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.


Generated on Mon Dec 1 14:34:45 2008 for NPL Scripting Reference for ParaEngine by  doxygen 1.5.2