QuaZIP  quazip-0-7-3
Public Member Functions | Public Attributes | List of all members
QuaZipFileInfo64 Struct Reference

Information about a file inside archive (with zip64 support). More...

#include <quazipfileinfo.h>

Public Member Functions

QFile::Permissions getPermissions () const
 Get the file permissions. More...
 
bool toQuaZipFileInfo (QuaZipFileInfo &info) const
 Converts to QuaZipFileInfo. More...
 
QDateTime getNTFSmTime (int *fineTicks=NULL) const
 Returns the NTFS modification time. More...
 
QDateTime getNTFSaTime (int *fineTicks=NULL) const
 Returns the NTFS access time. More...
 
QDateTime getNTFScTime (int *fineTicks=NULL) const
 Returns the NTFS creation time. More...
 
bool isEncrypted () const
 Checks whether the file is encrypted.
 

Public Attributes

QString name
 File name.
 
quint16 versionCreated
 Version created by.
 
quint16 versionNeeded
 Version needed to extract.
 
quint16 flags
 General purpose flags.
 
quint16 method
 Compression method.
 
QDateTime dateTime
 Last modification date and time. More...
 
quint32 crc
 CRC.
 
quint64 compressedSize
 Compressed file size.
 
quint64 uncompressedSize
 Uncompressed file size.
 
quint16 diskNumberStart
 Disk number start.
 
quint16 internalAttr
 Internal file attributes.
 
quint32 externalAttr
 External file attributes.
 
QString comment
 Comment.
 
QByteArray extra
 Extra field.
 

Detailed Description

Information about a file inside archive (with zip64 support).

Call QuaZip::getCurrentFileInfo() or QuaZipFile::getFileInfo() to fill this structure.

Member Function Documentation

◆ getPermissions()

QFile::Permissions QuaZipFileInfo64::getPermissions ( ) const

Get the file permissions.

Returns the high 16 bits of external attributes converted to QFile::Permissions.

◆ toQuaZipFileInfo()

bool QuaZipFileInfo64::toQuaZipFileInfo ( QuaZipFileInfo info) const

Converts to QuaZipFileInfo.

If any of the fields are greater than 0xFFFFFFFFu, they are set to 0xFFFFFFFFu exactly, not just truncated. This function should be mainly used for compatibility with the old code expecting QuaZipFileInfo, in the cases when it's impossible or otherwise unadvisable (due to ABI compatibility reasons, for example) to modify that old code to use QuaZipFileInfo64.

Returns
true if all fields converted correctly, false if an overflow occured.

References QuaZipFileInfo::comment, QuaZipFileInfo::compressedSize, QuaZipFileInfo::crc, QuaZipFileInfo::dateTime, QuaZipFileInfo::diskNumberStart, QuaZipFileInfo::externalAttr, QuaZipFileInfo::extra, QuaZipFileInfo::flags, QuaZipFileInfo::internalAttr, QuaZipFileInfo::method, QuaZipFileInfo::name, QuaZipFileInfo::uncompressedSize, QuaZipFileInfo::versionCreated, and QuaZipFileInfo::versionNeeded.

Referenced by QuaZip::getCurrentFileInfo(), and QuaZipFile::getFileInfo().

◆ getNTFSmTime()

QDateTime QuaZipFileInfo64::getNTFSmTime ( int *  fineTicks = NULL) const

Returns the NTFS modification time.

The getNTFS*Time() functions only work if there is an NTFS extra field present. Otherwise, they all return invalid null timestamps.

Parameters
fineTicksIf not NULL, the fractional part of milliseconds returned there, measured in 100-nanosecond ticks. Will be set to zero if there is no NTFS extra field.
See also
dateTime
getNTFSaTime()
getNTFScTime()
Returns
The NTFS modification time, UTC

◆ getNTFSaTime()

QDateTime QuaZipFileInfo64::getNTFSaTime ( int *  fineTicks = NULL) const

Returns the NTFS access time.

The getNTFS*Time() functions only work if there is an NTFS extra field present. Otherwise, they all return invalid null timestamps.

Parameters
fineTicksIf not NULL, the fractional part of milliseconds returned there, measured in 100-nanosecond ticks. Will be set to zero if there is no NTFS extra field.
See also
dateTime
getNTFSmTime()
getNTFScTime()
Returns
The NTFS access time, UTC

◆ getNTFScTime()

QDateTime QuaZipFileInfo64::getNTFScTime ( int *  fineTicks = NULL) const

Returns the NTFS creation time.

The getNTFS*Time() functions only work if there is an NTFS extra field present. Otherwise, they all return invalid null timestamps.

Parameters
fineTicksIf not NULL, the fractional part of milliseconds returned there, measured in 100-nanosecond ticks. Will be set to zero if there is no NTFS extra field.
See also
dateTime
getNTFSmTime()
getNTFSaTime()
Returns
The NTFS creation time, UTC

Member Data Documentation

◆ dateTime

QDateTime QuaZipFileInfo64::dateTime

Last modification date and time.

This is the time stored in the standard ZIP header. This format only allows to store time with 2-second precision, so the seconds will always be even and the milliseconds will always be zero. If you need more precise date and time, you can try to call the getNTFSmTime() function or its siblings, provided that the archive itself contains these NTFS times.

Referenced by QuaZipDir::dirName(), and QuaZip::getCurrentFileInfo().


The documentation for this struct was generated from the following files: