Fork Data Structure

Prev | Home | Next

Description

HFS Plus maintains information about the contents of a file using the HFSPlusForkData structure.

C struct [TXT]

struct HFSPlusForkData {
    UInt64                  logicalSize;
    UInt32                  clumpSize;
    UInt32                  totalBlocks;
    HFSPlusExtentRecord     extents;
};
typedef struct HFSPlusForkData HFSPlusForkData;
 
typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8];
 
struct HFSPlusExtentDescriptor {
    UInt32                  startBlock;
    UInt32                  blockCount;
};
typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor;
 

Fields of the fork data structure

logicalSize

description: The size, in bytes, of the valid data in the fork.

clumpSize

description:  For HFSPlusForkData structures in the volume header, this is the fork's clump size, which is used in preference to the default clump size in the volume header. For HFSPlusForkData structures in a catalog record, this field was intended to store a per-fork clump size to override the default clump size in the volume header.

totalBlocks

description: The total number of allocation blocks used by all the extents in this fork.

extents

description: An array of extent descriptors for the fork. This array holds the first eight extent descriptors. If more extent descriptors are required, they are stored in the extents overflow file.

startBlock

description: The first allocation block in the extent.

blockCount

description: The length, in allocation blocks, of the extent.

Prev | Home | Next

©2004 - 2008 [Vyacheslav Dubeyko | Äóáåéêî Âÿ÷åñëàâ] slava@dubeyko.com