ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QuaZipFileInfo64 Struct Reference

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

#include <src/ckb/quazip/quazipfileinfo.h>

+ Collaboration diagram for QuaZipFileInfo64:

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. More...
 

Data Fields

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

Detailed Description

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

Definition at line 81 of file quazipfileinfo.h.

Member Function Documentation

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

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

Definition at line 168 of file quazipfileinfo.cpp.

References extra, and getNTFSTime().

169 {
170  return getNTFSTime(extra, 8, fineTicks);
171 }
QByteArray extra
Extra field.
static QDateTime getNTFSTime(const QByteArray &extra, int position, int *fineTicks)

+ Here is the call graph for this function:

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

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

Definition at line 173 of file quazipfileinfo.cpp.

References extra, and getNTFSTime().

174 {
175  return getNTFSTime(extra, 16, fineTicks);
176 }
QByteArray extra
Extra field.
static QDateTime getNTFSTime(const QByteArray &extra, int position, int *fineTicks)

+ Here is the call graph for this function:

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

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

Definition at line 163 of file quazipfileinfo.cpp.

References extra, and getNTFSTime().

164 {
165  return getNTFSTime(extra, 0, fineTicks);
166 }
QByteArray extra
Extra field.
static QDateTime getNTFSTime(const QByteArray &extra, int position, int *fineTicks)

+ Here is the call graph for this function:

QFile::Permissions QuaZipFileInfo64::getPermissions ( ) const

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

Definition at line 57 of file quazipfileinfo.cpp.

References externalAttr, and permissionsFromExternalAttr().

Referenced by JlCompress::extractFile().

58 {
60 }
quint32 externalAttr
External file attributes.
static QFile::Permissions permissionsFromExternalAttr(quint32 externalAttr)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool QuaZipFileInfo64::isEncrypted ( ) const
inline

Definition at line 175 of file quazipfileinfo.h.

175 {return (flags & 1) != 0;}
quint16 flags
General purpose flags.
bool QuaZipFileInfo64::toQuaZipFileInfo ( QuaZipFileInfo info) const

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.

Definition at line 62 of file quazipfileinfo.cpp.

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

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

63 {
64  bool noOverflow = true;
65  info.name = name;
68  info.flags = flags;
69  info.method = method;
70  info.dateTime = dateTime;
71  info.crc = crc;
72  if (compressedSize > 0xFFFFFFFFu) {
73  info.compressedSize = 0xFFFFFFFFu;
74  noOverflow = false;
75  } else {
77  }
78  if (uncompressedSize > 0xFFFFFFFFu) {
79  info.uncompressedSize = 0xFFFFFFFFu;
80  noOverflow = false;
81  } else {
83  }
87  info.comment = comment;
88  info.extra = extra;
89  return noOverflow;
90 }
quint16 diskNumberStart
Disk number start.
QByteArray extra
Extra field.
quint16 versionCreated
Version created by.
QString comment
Comment.
quint32 externalAttr
External file attributes.
quint16 versionNeeded
Version needed to extract.
QByteArray extra
Extra field.
quint16 flags
General purpose flags.
QString name
File name.
quint16 versionCreated
Version created by.
QString comment
Comment.
quint32 compressedSize
Compressed file size.
quint32 crc
CRC.
quint64 compressedSize
Compressed file size.
quint16 versionNeeded
Version needed to extract.
quint16 internalAttr
Internal file attributes.
quint16 method
Compression method.
QDateTime dateTime
Last modification date and time.
quint64 uncompressedSize
Uncompressed file size.
quint32 uncompressedSize
Uncompressed file size.
quint32 crc
CRC.
QDateTime dateTime
Last modification date and time.
quint16 flags
General purpose flags.
quint16 diskNumberStart
Disk number start.
quint32 externalAttr
External file attributes.
quint16 method
Compression method.
QString name
File name.
quint16 internalAttr
Internal file attributes.

+ Here is the caller graph for this function:

Field Documentation

QString QuaZipFileInfo64::comment

Definition at line 114 of file quazipfileinfo.h.

Referenced by QuaZip::getCurrentFileInfo(), and toQuaZipFileInfo().

quint64 QuaZipFileInfo64::compressedSize
quint32 QuaZipFileInfo64::crc
QDateTime QuaZipFileInfo64::dateTime

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.

Definition at line 100 of file quazipfileinfo.h.

Referenced by QuaZip::getCurrentFileInfo(), and toQuaZipFileInfo().

quint16 QuaZipFileInfo64::diskNumberStart
quint32 QuaZipFileInfo64::externalAttr
QByteArray QuaZipFileInfo64::extra
quint16 QuaZipFileInfo64::flags
quint16 QuaZipFileInfo64::internalAttr
quint16 QuaZipFileInfo64::method
QString QuaZipFileInfo64::name
quint64 QuaZipFileInfo64::uncompressedSize
quint16 QuaZipFileInfo64::versionCreated
quint16 QuaZipFileInfo64::versionNeeded

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