2 // lf_hfs_file_extent_mapping.h
5 // Created by Yakov Ben Zaken on 22/03/2018.
8 #ifndef lf_hfs_file_extent_mapping_h
9 #define lf_hfs_file_extent_mapping_h
11 /* File Extent Mapping routines*/
12 OSErr
FlushExtentFile( ExtendedVCB
*vcb
);
14 int32_t CompareExtentKeysPlus( const HFSPlusExtentKey
*searchKey
, const HFSPlusExtentKey
*trialKey
);
16 OSErr
SearchExtentFile( ExtendedVCB
*vcb
,
19 HFSPlusExtentKey
*foundExtentKey
,
20 HFSPlusExtentRecord foundExtentData
,
21 u_int32_t
*foundExtentDataIndex
,
22 u_int32_t
*extentBTreeHint
,
23 u_int32_t
*endingFABNPlusOne
);
25 OSErr
TruncateFileC( ExtendedVCB
*vcb
,
31 Boolean truncateToExtent
);
33 OSErr
ExtendFileC( ExtendedVCB
*vcb
,
38 int64_t *actualBytesAdded
);
40 OSErr
MapFileBlockC( ExtendedVCB
*vcb
,
44 daddr64_t
*startBlock
,
45 size_t *availableBytes
);
47 OSErr
HeadTruncateFile( ExtendedVCB
*vcb
,
51 int AddFileExtent( ExtendedVCB
*vcb
,
54 u_int32_t blockCount
);
56 Boolean
NodesAreContiguous( ExtendedVCB
*vcb
,
60 #endif /* lf_hfs_file_extent_mapping_h */