New()
Previous  Top  Next

:New() - Create an XbZLibZip Object.

Syntax

XbZLibZip():New([<cFileName>],  
                [<nOpenMode>],  
                [<nCompression>]) --> oXbZLibZip  

Parameters

<cFileName>  
<cFileName> optionally specifies the File Name of the Zip File. For details see the :Open() method. If this parameter is empty (or NIL), all three parameters are ignored!  

<nOpenMode>  
<nOpenMode> optionally specifies the Open Mode for the Zip File. For details see the :Open() method. This parameter is ignored, if no File Name is given!  

<nCompression>  
<nCompression> optionally specifies the Default Compression Level for adding/updating Files. For details see the :Open() method. This parameter is ignored, if no File Name is given!  

Returns

This method returns an initialized XbZLibZip Object.  

Description

This method creates and initializes the Zip File object and resets all Internal Variables, including the Callback Slot variables.  
 
If a File Name is specified, the :Open() method will automatically be called, and all three optional parameters will be forwarded to it. If no File Name is given, the :Open() method is not called, and the other two parameters are simply ignored.  
 
This is the :Init() method in the source code.  

Example

Create a new XbZLibZip object and open Zip File "MyArchive.zip":  
 
oZip := XbZLibZip():New('MyArchive.zip')