typedef struct MftEntry
{
char Signature [4]; // Magic "FILE"
ushort FixupOffset;
ushort FixupSize;
ulong
ulong
ushort Sequence; // Sequence number in MFT
ushort HardLinks; // Hard link count
ushort AttribOffset; // Offset of attributes
ushort Flags;
ulong RecLength; // True record size
ulong AllLength; // Allocated record size
cluster BaseMftRec; // Base entry of this entry or 0
ushort MinIdentificator;
ushort FixupPattern;
ushort FixupList [];
};
typedef struct AttributeEntry
{
ulong Type; // Type of attribute
ushort Length; // Length of attribute entry
ushort
byte Residency; // Resident or nonresident
byte NameLen; // Length of name
ushort Offset; // Offset of name or data
byte Compressed; // Compressed or uncompressed
byte
ushort Identificator;
union
{
ResidentAttribEntry Resident;
NonresidentAttribEntry NonResident;
};
};
typedef struct ResidentAttribEntry
{
ushort Size; // Size of attribute
ushort
ushort Offset; // Offset of value
ushort IndexFlag;
};
typedef struct NonResidentAttribEntry
{
cluster SegFirst; // First cluster in this segment
cluster SegLast; // Last cluster in this segment
USHORT Offset; // Offset of run list
USHORT ComprEngine; // Compression engine
USHORT
USHORT
XLONG Allocated; // Allocated disk space
XLONG Size; // Size of uncompressed attribute
XLONG Compressed; // Size of compressed attribute
};
typedef struct DirectoryEntry
{
xlong RecordNumber; // This MFT record number
ushort Length; // Length of directory entry
ushort
byte Flags;
byte
xlong Parent; // Parent MFT record number
time Create; // Creation time
time ModifyFile; // Last file modification time
time ModifyEntry; // Last entry modification time
time Access; // Last access time
xlong Alloc; // Allocated size
xlong Size; // Real size
xlong
byte NameLen; // Name length in words
byte NameType; // Type of filename
ushort Filename []; // Variable length filename
};