FOM Reference > Application > Printers > fZip interface
  
fZip interface
This object lets you create zip files.
OpenModes enumeration
The mode to use when opening the zip file.
The OpenModes enumeration has the following constants of type int.
OPEN_EXIST = 0
Only open the zip if it already exists.
OPEN_CREATE = 1
Create the zip if it does not exist.
OPEN_CLEAR = 2
Clear an existing zip file when opening it.
OPEN_READONLY = 4
Open the zip file in read only mode.
CompressionLevels enumeration
The compression level to use.
The CompressionLevels enumeration has the following constants of type int.
COMPRESS_DEFAULT = -1
Use the default compression level.
COMPRESS_SHRINK = 0
Use compression.
COMPRESS_NONE = 1
Use no compression.
area attribute
The name of the APP area used to access the contents of the zip file.
area
Access
read-only
Returns
String
defaultCompression attribute
The default compression level used for all files. The value is one of fZip-CompressionLevels.
defaultCompression
Access
read-only
Returns
int
isOpen attribute
If false, the zip file has been closed and can no longer be used.
isOpen
Access
read-only
Returns
boolean
openMode attribute
The mode used to open this zip file. The value is one of fZip-OpenModes.
openMode
Access
read-only
Returns
int
path attribute
The path of the zip file.
path
Access
read-only
Returns
fPath
close method
Closes the zip, writing out all compressed data.
close
Parameters
None
Returns
void. None.
fileAdd method
Adds a file to the fZip object.
fileAddpathsourcePathcompression
Parameters
Stringpath
The path of the file to use in the zip file.
fPathsourcePath
The path of the source file that is being added.
intcompression
The compression level to use for the file. Values are in fZip-CompressionLevels.
Returns
void. None.
fileDelete method
Deletes a file from the fZip object.
fileDeletepath
Parameters
Stringpath
The path of the file to delete from the zip file.
Returns
void. None.
fileRename method
Renames a file in the fZip object.
fileRenamefromto
Parameters
Stringfrom
The name of the file in the zip to rename.
Stringto
The name the file should be renamed to.
Returns
void. None.
folderAdd method
Adds an entire folder to the fZip object.
folderAddpathsourcePathcompression
Parameters
Stringpath
The path of the folder to use in the zip file.
fPathsourcePath
The path of the source folder that is being added.
intcompression
The compression level to use for the files in the folder. Values are in fZip-CompressionLevels.
Returns
void. None.
folderCreate method
Creates a new folder in the fZip object.
folderCreatepath
Parameters
Stringpath
The path of the folder to use in the zip file.
Returns
void. None.
streamAdd method
Adds a stream to the fZip object.
streamAddpathsourceStreamcompression
Parameters
Stringpath
The path of the file to use in the zip file.
fStreamsourceStream
The name of the source stream that is being added.
intcompression
The compression level to use for the file. Values are in fZip-CompressionLevels.
Returns
void. None.