Reads Zip archive files. More...
Import Statement: | import Esri.ArcGISExtras 1.1 |
Since: | Esri.ArcGISExtras 1.0 |
Properties
- Result : enumeration
- caseSensitive : bool
- fileNames : list<string>
- folderNames : list<string>
- isOpen : bool
- path : string
Signals
- caseSensitiveChanged()
- extractCompleted()
- extractError(string fileName, string outputFileName, ZipArchive.Result result)
- extractProgress(string fileName, string outputFileName, double percent)
- pathChanged()
Methods
- void close()
- bool exists(string fileName)
- bool extractAll(string outputPath)
- bool extractFile(string fileName, string outputFilePath)
- ZipFileInfo fileInfo(string fileName)
Detailed Description
This type simplifies reading Zip archive files by providing the most commonly used operations.
Property Documentation
Enumerates possible result codes for a Zip compressed archive extract operation.
The ZipArchive.Result can be one of:
Constant | Description |
---|---|
Result.EndOfListOfFile | End Of List Of File |
Result.ErrNo | Err No |
Result.EndOfFile | End Of File |
Result.ParameterError | Parameter Error |
Result.BadZipFile | Bad Zip File |
Result.InternalError | Internal Error |
Result.CrcError | CRC Error |
This property was introduced in Esri.ArcGISExtras 1.0.
Whether names of the files in the archive are case-sensitive.
Set to true
if file names are case-sensitive.
Returns a list of files in the archive (read-only).
The archive must be open, or this property is an empty list.
Returns a list of folders in the archive (read-only).
The archive must be open, or this property is an empty list.
Signal Documentation
Emitted when the caseSensitive property of this object changes.
Note: The corresponding handler is onCaseSensitiveChanged
.
Emitted when extraction is complete.
Note: The corresponding handler is onExtractCompleted
.
extractError(string fileName, string outputFileName, ZipArchive.Result result) |
Emitted when file extraction fails.
- fileName The name of the file in the archive.
- outputFileName The intended destination file.
- result The ZipArchive.Result enumeration of the cause of the error.
Note: The corresponding handler is onExtractError
.
Emitted periodically during file extraction.
- fileName The name of the file in the archive.
- outputFileName The intended destination file.
- percent Percent complete.
Note: The corresponding handler is onExtractProgress
.
Emitted when the path property of this object changes.
Note: The corresponding handler is onPathChanged
.
Method Documentation
Gets whether a file exists in the archive.
Returns true
if the archive is open and the file named fileName is in the archive; otherwise false
.
Extracts all files from the archive.
- outputPath The path to the destination folder.
Returns true
if successful; otherwise false
.
Extracts a file from the archive.
- fileName The name of the file in the archive.
- outputFilePath The complete path and name of the destination file.
Returns true
if successful; otherwise false
. If the output file already exists, it will be overwritten.
ZipFileInfo fileInfo(string fileName) |
Returns a ZipFileInfo object with information about a file in the archive.
Returns null if the archive is not open or the file fileName cannot be found in the archive.