THeaderData: Difference between revisions
Jump to navigation
Jump to search
Francoisal (talk | contribs) No edit summary |
(backlink) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
HeaderData is a structure used in [[ | HeaderData is a structure used in [[ReadHeader]]. | ||
typedef struct { | typedef struct { | ||
Line 21: | Line 21: | ||
== Description == | == Description == | ||
* ArcName, FileName, PackSize, UnpSize contain the name of the archive, the name of the file within the archive, size of the file when packed, and the size of the file when extracted, respectively. | * ''ArcName'', ''FileName'', ''PackSize'', ''UnpSize'' contain the name of the archive, the name of the file within the archive, size of the file when packed, and the size of the file when extracted, respectively. | ||
* HostOS is there for compatibility with unrar.dll only, and should be set to zero. | * ''HostOS'' is there for compatibility with unrar.dll only, and should be set to zero. | ||
* FileCRC is the 32-bit CRC (cyclic redundancy check) checksum of the file. If not available, set to zero. | * ''FileCRC'' is the 32-bit CRC (cyclic redundancy check) checksum of the file. If not available, set to zero. | ||
* The Cmt* values can be used to transfer file comment information. They are currently not used in Total Commander, so they may be set to zero. | * The ''Cmt*'' values can be used to transfer file comment information. They are currently not used in Total Commander, so they may be set to zero. | ||
* FileAttr can be set to any combination of the following values: | * ''FileAttr'' can be set to any combination of the following values: | ||
{| border="1" align="center" | {| border="1" align="center" | ||
Line 49: | Line 49: | ||
'''Make sure that:''' | '''Make sure that:''' | ||
* year is in the four digit format between 1980 and 2100 | * ''year'' is in the four digit format between 1980 and 2100 | ||
* month is a number between 1 and 12 | * ''month'' is a number between 1 and 12 | ||
* hour is in the 24 hour format | * ''hour'' is in the 24 hour format | ||
{{Backlink|Packer plugins developer guide|Packer plugins developer guide}} | |||
{{Back|ReadHeader|ReadHeader}} |
Latest revision as of 17:21, 18 April 2006
HeaderData is a structure used in ReadHeader.
typedef struct { char ArcName[260]; char FileName[260]; int Flags; int PackSize; int UnpSize; int HostOS; int FileCRC; int FileTime; int UnpVer; int Method; int FileAttr; char* CmtBuf; int CmtBufSize; int CmtSize; int CmtState; } tHeaderData;
Description
- ArcName, FileName, PackSize, UnpSize contain the name of the archive, the name of the file within the archive, size of the file when packed, and the size of the file when extracted, respectively.
- HostOS is there for compatibility with unrar.dll only, and should be set to zero.
- FileCRC is the 32-bit CRC (cyclic redundancy check) checksum of the file. If not available, set to zero.
- The Cmt* values can be used to transfer file comment information. They are currently not used in Total Commander, so they may be set to zero.
- FileAttr can be set to any combination of the following values:
Value | Description |
---|---|
0x1 | Read-only file |
0x2 | Hidden file |
0x4 | System file |
0x8 | Volume ID file |
0x10 | Directory |
0x20 | Archive file |
0x3F | Any file |
- FileTime contains the date and the time of the file’s last update. Use the following algorithm to set the value:
FileTime = (year - 1980) << 25 | month << 21 | day << 16 | hour << 11 | minute << 5 | second/2;
Make sure that:
- year is in the four digit format between 1980 and 2100
- month is a number between 1 and 12
- hour is in the 24 hour format
Back to Packer plugins developer guide
Back to ReadHeader