[][src]Struct wcxhead::tHeaderDataEx

#[repr(C)]
pub struct tHeaderDataEx {
    pub ArcName: [c_char; 1024],
    pub FileName: [c_char; 1024],
    pub Flags: c_int,
    pub PackSize: c_uint,
    pub PackSizeHigh: c_uint,
    pub UnpSize: c_uint,
    pub UnpSizeHigh: c_uint,
    pub HostOS: c_int,
    pub FileCRC: c_int,
    pub FileTime: c_int,
    pub UnpVer: c_int,
    pub Method: c_int,
    pub FileAttr: c_int,
    pub CmtBuf: *mut c_char,
    pub CmtBufSize: c_int,
    pub CmtSize: c_int,
    pub CmtState: c_int,
    pub Reserved: [c_char; 1024],
}

tHeaderDataEx is a structure used in ReadHeaderEx.

typedef struct {

    char ArcName[1024];
    char FileName[1024];
    int Flags;
    unsigned int PackSize;
    unsigned int PackSizeHigh;
    unsigned int UnpSize;
    unsigned int UnpSizeHigh;
    int HostOS;
    int FileCRC;
    int FileTime;
    int UnpVer;
    int Method;
    int FileAttr;
    char* CmtBuf;
    int CmtBufSize;
    int CmtSize;
    int CmtState;
    char Reserved[1024];
  } tHeaderDataEx;

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. PackSizeHigh, UnpSizeHigh contain the upper 32 bit of a 64-bit size number. Set to 0 if the file is smaller than 4 GB.

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:

ValueDescription
0x1Read-only file
0x2Hidden file
0x4System file
0x8Volume ID file
0x10Directory
0x20Archive file
0x3FAny 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

Reserved may be used in the future for additional data - you MUST set it to 0 for now to avoid problems with future versions of TC.

Note:

The Unicode version of this structure uses WCHAR[1024] for ArcName and FileName. "Reserved" is unchanged.

Fields

ArcName: [c_char; 1024]FileName: [c_char; 1024]Flags: c_intPackSize: c_uintPackSizeHigh: c_uintUnpSize: c_uintUnpSizeHigh: c_uintHostOS: c_intFileCRC: c_intFileTime: c_intUnpVer: c_intMethod: c_intFileAttr: c_intCmtBuf: *mut c_charCmtBufSize: c_intCmtSize: c_intCmtState: c_intReserved: [c_char; 1024]

Auto Trait Implementations

impl !Sync for tHeaderDataEx

impl Unpin for tHeaderDataEx

impl !Send for tHeaderDataEx

impl UnwindSafe for tHeaderDataEx

impl RefUnwindSafe for tHeaderDataEx

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]