DzZipFile Class Reference
[File Input and Output Objects]

DAZ Script *.zip file I/O class. More...

Inheritance diagram for DzZipFile:

DzFileInfo List of all members.

Enumerations

enum  AccessMode { ReadOnly, WriteOnly, Append }

Methods

void close ()
Boolean compressAll (String path, Boolean recursive=true)
Boolean extractAll (String path)
String getFileComment ()
Number getNumEntries ()
bool open (AccessMode mode)

Constructors

 DzZipFile (String file)

Detailed Description

DAZ Script *.zip file I/O class.

This class provides DAZ Script functionality for reading and writing *.zip files.


Member Enumeration Documentation

enum DzZipFile::AccessMode

File access mode flags

Enumerator:
ReadOnly  Open the file for reading only
WriteOnly  Open the file for writing only
Append  Open the file in append mode. Keep existing file contents and start with the file pointer at the end of the file.


Constructor & Destructor Documentation

DzZipFile::DzZipFile ( String  file  ) 

Create a file with the given file name


Member Function Documentation

void DzZipFile::close (  ) 

Close the file

Boolean DzZipFile::compressAll ( String  path,
Boolean  recursive = true 
)

Compresses all the files in the given directory.

Parameters:
path The directory to compress files from.
recursive If true, the entire directory tree is compressed (i.e. the directory and all of its subdirectories, recursively). Otehrwise, only files in the given path are compressed.

Boolean DzZipFile::extractAll ( String  path  ) 

Extracts all the files from the zip file. The files are created relative to the given path.

String DzZipFile::getFileComment (  ) 

The global comment for the zip file.

int DzZipFile::getNumEntries (  ) 

Returns:
The number of entries in the zip file.

bool DzZipFile::open ( AccessMode  mode  ) 

Open the file with the given mode.

Returns:
true if the file was opened successfully.


Generated on Thu Sep 24 12:21:16 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.