ZipFileInfo QML Type

The ZipFileInfo component provides information about a .ZIP compressed file. More...

Import Statement: import ArcGIS.AppFramework 1.0
Inherits:

AppFrameworkObject

Properties

Detailed Description

The ZipFileInfo component reads and returns file information about a zip archive and its contents. It works similarly to the FileInfo component, but is only capable of reading zip archives and their contents.

This is a read-only component; it contains no capability to write to or alter any details of a compressed file, it can only read them.

This code sample demonstrates using multiple properties obtained through ZipFileInfo to provide a console log of a zip archive's contents.

Item {
        ZipReader {
                id:zipreader
        path:"C:\\testing\\ZipReader\\testfile.zip"
                }

        Button {
                text:"Zip FileInfo"
                onClicked:{
                        var zipfileinfo = zipreader.fileInfo("qt.txt")
                        console.log(("The file %1 within the zip file has a compressed size of %2 bytes
                        and was last modified at %3").arg(zipfileinfo.fileName).arg(zipfileinfo.compressedSize).arg(zipfileinfo.lastModified))
                }
        }
}

Property Documentation

[read-only] compressedSize : int

Returns the size of the compressed file in bytes.

For example, a 336 kilobyte compressed file will return 336000.


[read-only] crc : ulong

Runs the cyclic redundancy check (CRC) code, used to prevent accidental changes to raw data.


[read-only] fileName : string

Returns the name of the compressed file.


[read-only] filePath : string

Returns the path to the compressed file, including the file name.


[read-only] lastModified : time

Returns the date and time the file was last modified.


[read-only] path : string

Returns the path to the compressed file, not including the file name.


[read-only] size : int

Returns the uncompressed file size in bytes.

For example, a file 413 kilobytes when uncompressed will return 413000.


[read-only] suffix : string

Returns the last characters of a file's name, after the last dot.


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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close