The ZipFileInfo component provides information about a .ZIP compressed file. More...
Import Statement: | import ArcGIS.AppFramework 1.0 |
Inherits: |
Properties
- compressedSize : int
- crc : ulong
- fileName : string
- filePath : string
- lastModified : time
- path : string
- size : int
- suffix : string
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
Returns the size of the compressed file in bytes.
For example, a 336 kilobyte compressed file will return 336000.
Runs the cyclic redundancy check (CRC) code, used to prevent accidental changes to raw data.
Returns the uncompressed file size in bytes.
For example, a file 413 kilobytes when uncompressed will return 413000.