The GetZipContents method allows your application to obtain a detailed listing of the files in a zip file in the form of an object.
You must specify the type of object you want to receive from this method with the xFormat parameter. Currently, only the Collection object type is supported, and this type is in fact an XceedZipItems collection object. The XceedZipItems object itself contains a collection of one or more XceedZipItem objects - one for each file or folder being listed.
The zip file to list must be specified by the ZipFilename property.
If the FilesToProcess property is empty, all files in the zip file will be listed, except those that are excluded by the filtering properties.
After the GetZipContents method has completed its operation, the ProcessCompleted event is triggered and provides the statistics for the entire group of files that were listed in the collection object.
You can use the ListZipContents method instead of the GetZipContents method if you prefer to obtain the listing of files through an event instead of by receiving an collection object.
Declaration (ActiveX) | |
---|---|
Method GetZipContents( xContents As XceedZipItems, xFormat As xcdContentsFormat) As xcdError; |
Declaration (DLL API) | |
---|---|
int XCD_WINAPI XzGetZipContents( HXCEEDZIP hZip, HXCEEDZIPITEMS* phItems ) |
Note: Calling this method causes a handle to be written to the location pointed to by the phItems parameter. You will then provide this handle to the XziGetFirstItem and XziGetNextItem functions, as well as to the XziDestroyXceedZipItems function once you no longer need the handle.
Parameter | Description |
---|---|
xContents | The XceedZipItems object which will contain the listed files (in the form of XceedZipItem objects) after the GetZipContents method has completed. |
xFormat | Currently can only be set to fcfCollection |
A return value of type xcdError is returned. Only the return value of xerSuccess indicates that the method has been completed successfully. See the error codes topic for a list of possible return values.
The files listed by the GetZipContents method can be limited by the FilesToProcess, FilesToExclude and the filtering properties – but are not affected by the SkipIf* properties. Therefore, if you don't use the SkipIf* properties, the GetZipContents method can be used to obtain the complete list of files that will end up being processed by a call to the Unzip method.
Abort, ZipFilename, FilesToProcess, ProcessSubfolders and the filtering properties.
InsertDisk, ZipContentsStatus, ZipComment, Warning and ProcessCompleted
The PreviewFiles method allows you to list the files that are on disk (not yet in a zip file).