ZipArchive QML Type

Reads Zip archive files. More...

Import Statement: import Esri.ArcGISExtras 1.1
Since: Esri.ArcGISExtras 1.0

Properties

Signals

Methods

Detailed Description

This type simplifies reading Zip archive files by providing the most commonly used operations.

Property Documentation

Result : enumeration

Enumerates possible result codes for a Zip compressed archive extract operation.

The ZipArchive.Result can be one of:

ConstantDescription
Result.EndOfListOfFileEnd Of List Of File
Result.ErrNoErr No
Result.EndOfFileEnd Of File
Result.ParameterErrorParameter Error
Result.BadZipFileBad Zip File
Result.InternalErrorInternal Error
Result.CrcErrorCRC Error

This property was introduced in Esri.ArcGISExtras 1.0.


caseSensitive : bool

Whether names of the files in the archive are case-sensitive.

Set to true if file names are case-sensitive.


fileNames : list<string>

Returns a list of files in the archive (read-only).

The archive must be open, or this property is an empty list.


folderNames : list<string>

Returns a list of folders in the archive (read-only).

The archive must be open, or this property is an empty list.


isOpen : bool

Returns true if the archive is open (read-only).


path : string

The resolved path to the archive.


Signal Documentation

caseSensitiveChanged()

Emitted when the caseSensitive property of this object changes.

Note: The corresponding handler is onCaseSensitiveChanged.


extractCompleted()

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.


extractProgress(string fileName, string outputFileName, double percent)

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.


pathChanged()

Emitted when the path property of this object changes.

Note: The corresponding handler is onPathChanged.


Method Documentation

void close()

Close the archive.


bool exists(string fileName)

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.


bool extractAll(string outputPath)

Extracts all files from the archive.

  • outputPath The path to the destination folder.

Returns true if successful; otherwise false.


bool extractFile(string fileName, string outputFilePath)

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.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.