TNTFSDiskIndex
Return to Unit NTFSClass
Description
To be documented
Class definitions
TNTFSDiskIndex = class(TLinkedObjBtree)
Note: Index of INDX records. | |
constructor Create(AKeyLocal:TMutexHandle; ALock:TSynchronizerHandle; AVolumeVersion,ASectorSize:Word; AIndexType,ACollateRule:LongWord; AAttribute:TNTFSDiskAttribute);
|
|
destructor Destroy; override;
|
|
private
| |
FLock:TSynchronizerHandle;
|
|
FKeyLocal:TMutexHandle;
|
|
FStatus:LongWord;
|
|
FSectorSize:Word;
|
|
FVolumeVersion:Word;
|
|
FIndexType:LongWord;
|
Attribute Type (Or None if Data Index) |
FCollateRule:LongWord;
|
Collation Rule |
FIndexRecordSize:LongWord;
|
Size of Index Allocation Entry (bytes) |
FIndexCounterOffset:LongWord;
|
Index Record Number increment |
FClustersPerIndex:LongWord;
|
Clusters per INDX Record or 0 if less than cluster size |
FIndexsPerCluster:LongWord;
|
INDX Records per Cluster or 0 if more than cluster size |
FIndexCounterShift:Word;
|
Shift count for Record -> Counter |
FIndexRecordShiftCount:Word;
|
Shift count for Record -> VCN |
FIndexRecordOffsetMask:Int64;
|
Mask for Record offset calculation |
FTotalIndexRecordCount:Int64;
|
Total number of index records in index |
FLastFreeIndexRecord:Int64;
|
Or ntfsUnknownRecordNumber if not known |
FFreeIndexRecordCount:Int64;
|
Or ntfsUnknownRecordNumber if not known |
FCompareSecurityDescriptor:TNTFSCompareSecurityDescriptor;
|
|
FUpCase:TNTFSUpCase;
|
Uppercase Conversion Table |
FNodes:TNTFSDiskNodes;
|
List of index nodes |
FAttribute:TNTFSDiskAttribute;
|
Attribute owning this index |
function GetNodesLock:TSynchronizerHandle;
|
|
function GetKeyLocal:TMutexHandle;
|
|
function GetNodeLocal:TMutexHandle;
|
|
function GetLoaded:Boolean;
|
|
procedure SetLoaded(AValue:Boolean);
|
|
function GetChanged:Boolean;
|
|
function GetUpCase:PNTFSUpCaseData;
|
|
function GetRootNode:TNTFSDiskNode;
|
|
function CreateNodes(ANew:Boolean):TNTFSDiskNodes;
|
|
function CompareKey(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
|
|
function CompareBinary(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
|
|
function CompareFileName(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
|
|
function CompareUnicode(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
|
|
function CompareLongWord(AEntry1,AEntry2:LongWord; ASize1,ASize2:Word):Integer;
|
|
function CompareSID(AEntry1,AEntry2:PSID; ASize1,ASize2:Word):Integer;
|
|
function CompareSecurityHash(AEntry1,AEntry2:PNTFSSecurityHashKeyData; ASize1,ASize2:Word):Integer;
|
|
function CompareGUID(AEntry1,AEntry2:PGUID; ASize1,ASize2:Word):Integer;
|
|
protected
| |
function GetEnd(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetStart(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetBlank(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetMedian(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetDropTest(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;
|
|
function GetDrop(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject; override;
|
|
function GetMerge(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetBorrow(AEntry:TBtreeObject):TBtreeObject; override;
|
|
function GetTarget(ADrop:TBtreeObject; ALeft:Boolean):TBtreeObject; override;
|
|
function PushNode(AEntry:TBtreeObject):Boolean; override;
|
|
function SplitNode(AEntry:TBtreeObject):Boolean; override;
|
|
function DropNode(AEntry,ADrop,ATarget:TBtreeObject; ALeft:Boolean):Boolean; override;
|
|
function DropNodeOld(AEntry,ADrop:TBtreeObject; ALeft:Boolean):Boolean; override;
|
|
function MergeNode(AEntry,AMerge:TBtreeObject):Boolean; override;
|
|
function BorrowEntry(AEntry,ABorrow:TBtreeObject):Boolean; override;
|
|
function SwapEntry(AEntry,ASwap:TBtreeObject;ALeft:Boolean):Boolean; override;
|
|
function SetParentEntry(AEntry,AParent:TBtreeObject):Boolean; override;
|
|
function DeleteBlank(ABlank:TBtreeObject):Boolean; override;
|
|
function AttachBlank(ABlank:TBtreeObject):Boolean; override;
|
|
function DetachBlank(ABlank:TBtreeObject):Boolean; override;
|
|
function AttachEntry(AEntry:TBtreeObject):Boolean; override;
|
|
function DetachEntry(AEntry:TBtreeObject):Boolean; override;
|
|
function RequirePush(AEntry:TBtreeObject):Boolean; override;
|
|
function RequireSplit(AEntry:TBtreeObject):Boolean; override;
|
|
function RequireDrop(AEntry:TBtreeObject):Boolean; override;
|
|
function RequireMerge(AEntry:TBtreeObject):Boolean; override;
|
|
function RequireBorrow(AEntry:TBtreeObject):Boolean; override;
|
|
public
| |
property Loaded:Boolean read GetLoaded write SetLoaded;
|
|
property Changed:Boolean read GetChanged;
|
|
property SectorSize:Word read FSectorSize write FSectorSize;
|
|
property VolumeVersion:Word read FVolumeVersion;
|
|
property IndexType:LongWord read FIndexType write FIndexType;
|
|
property CollateRule:LongWord read FCollateRule write FCollateRule;
|
|
property IndexRecordSize:LongWord read FIndexRecordSize write FIndexRecordSize;
|
|
property IndexCounterOffset:LongWord read FIndexCounterOffset write FIndexCounterOffset;
|
|
property ClustersPerIndex:LongWord read FClustersPerIndex write FClustersPerIndex;
|
|
property IndexsPerCluster:LongWord read FIndexsPerCluster write FIndexsPerCluster;
|
|
property IndexCounterShift:Word read FIndexCounterShift write FIndexCounterShift;
|
|
property IndexRecordShiftCount:Word read FIndexRecordShiftCount write FIndexRecordShiftCount;
|
|
property IndexRecordOffsetMask:Int64 read FIndexRecordOffsetMask write FIndexRecordOffsetMask;
|
|
property TotalIndexRecordCount:Int64 read FTotalIndexRecordCount write FTotalIndexRecordCount;
|
|
property LastFreeIndexRecord:Int64 read FLastFreeIndexRecord write FLastFreeIndexRecord;
|
|
property FreeIndexRecordCount:Int64 read FFreeIndexRecordCount write FFreeIndexRecordCount;
|
|
property CompareSecurityDescriptor:TNTFSCompareSecurityDescriptor read FCompareSecurityDescriptor write FCompareSecurityDescriptor;
|
|
property UpCase:TNTFSUpCase read FUpCase write FUpCase;
|
|
property Nodes:TNTFSDiskNodes read FNodes;
|
|
property Attribute:TNTFSDiskAttribute read FAttribute;
|
|
property RootNode:TNTFSDiskNode read GetRootNode;
|
|
function NodeCount:Integer;
|
|
function CreateKey(ANode:TNTFSDiskNode; ABlank:Boolean):TNTFSDiskKey; virtual;
|
|
function DestroyKey(AKey:TNTFSDiskKey):Boolean;
|
|
function NewKey(AKey,AData:Pointer; AKeySize,ADataSize:Word):TNTFSDiskKey; virtual;
|
|
function NewKeyEx(AKey,AData,APadding:Pointer; AKeySize,ADataSize,APaddingSize:Word):TNTFSDiskKey; virtual;
|
|
function AddKey(AParent,AKey:TNTFSDiskKey):Boolean;
|
|
function InsertKey(AKey:TNTFSDiskKey):Boolean;
|
|
function RemoveKey(AKey:TNTFSDiskKey):Boolean;
|
|
function CreateNode(ANew:Boolean):TNTFSDiskNode;
|
|
function DestroyNode(ANode:TNTFSDiskNode):Boolean;
|
|
function NewNode(const ARecordNumber:Int64):TNTFSDiskNode;
|
|
function GetNode(const ARecordNumber:Int64):TNTFSDiskNode;
|
|
function DeleteNode(ANode:TNTFSDiskNode):Boolean;
|
|
function RemoveNode(ANode:TNTFSDiskNode):Boolean;
|
|
function UpdateNodes(AVersion:Word):Boolean; virtual;
|
|
function FindKey(AValue:Pointer; ASize:Word):TNTFSDiskKey; virtual;
|
|
function ReadRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
|
|
function WriteRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
|
|
function ReadKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
|
|
function WriteKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
|
|
function ReaderLock:Boolean;
|
|
function ReaderUnlock:Boolean;
|
|
function WriterLock:Boolean;
|
|
function WriterUnlock:Boolean;
|
Function declarations
constructor TNTFSDiskIndex.Create(AKeyLocal:TMutexHandle; ALock:TSynchronizerHandle; AVolumeVersion,ASectorSize:Word; AIndexType,ACollateRule:LongWord; AAttribute:TNTFSDiskAttribute);
Note | None documented |
---|
destructor TNTFSDiskIndex.Destroy;
Note | None documented |
---|
function TNTFSDiskIndex.GetNodesLock:TSynchronizerHandle;
Note | None documented |
---|
function TNTFSDiskIndex.GetKeyLocal:TMutexHandle;
Note | None documented |
---|
function TNTFSDiskIndex.GetNodeLocal:TMutexHandle;
Note | None documented |
---|
function TNTFSDiskIndex.GetLoaded:Boolean;
Note | None documented |
---|
procedure TNTFSDiskIndex.SetLoaded(AValue:Boolean);
Note | None documented |
---|
function TNTFSDiskIndex.GetChanged:Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.GetUpCase:PNTFSUpCaseData;
Note | None documented |
---|
function TNTFSDiskIndex.GetRootNode:TNTFSDiskNode;
Note | None documented |
---|
function TNTFSDiskIndex.CreateNodes(ANew:Boolean):TNTFSDiskNodes;
Note | None documented |
---|
function TNTFSDiskIndex.CompareKey(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CompareBinary(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CompareFileName(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
Note | Current implementation is a simple ordinal value compare
May need to use CompareString/CompareStringEx in future |
---|
function TNTFSDiskIndex.CompareUnicode(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
Note | Current implementation is a simple ordinal value compare
May need to use CompareString/CompareStringEx in future
|
---|
function TNTFSDiskIndex.CompareLongWord(AEntry1,AEntry2:LongWord; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CompareSID(AEntry1,AEntry2:PSID; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CompareSecurityHash(AEntry1,AEntry2:PNTFSSecurityHashKeyData; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CompareGUID(AEntry1,AEntry2:PGUID; ASize1,ASize2:Word):Integer;
Note | None documented |
---|
function TNTFSDiskIndex.GetEnd(AEntry:TBtreeObject):TBtreeObject;
Note | None documented |
---|
function TNTFSDiskIndex.GetStart(AEntry:TBtreeObject):TBtreeObject;
Note | None documented |
---|
function TNTFSDiskIndex.GetBlank(AEntry:TBtreeObject):TBtreeObject;
Note | None documented |
---|
function TNTFSDiskIndex.GetMedian(AEntry:TBtreeObject):TBtreeObject;
Note | Does not include the blank key
The minimum key count is 3 including the blank |
---|
function TNTFSDiskIndex.GetDropTest(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;
Note | Always drop with the Righthand neighbour if available
If both lefthand and righthand nodes are nil then GetDrop will return the entry itself to indicate success, the node should then be dropped without demoting the parent. No account is made of whether the lefthand or righthand nodes have room for the demoted parent, the caller must check for require push or split on the neighbour after drop. |
---|
function TNTFSDiskIndex.GetDrop(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;
Note | Always drop with the Righthand neighbour if available
If both lefthand and righthand nodes are nil then GetDrop will return the entry itself to indicate success, the node should then be dropped without demoting the parent.
|
---|
function TNTFSDiskIndex.GetMerge(AEntry:TBtreeObject):TBtreeObject;
Note | Always merge with the Righthand neighbour if available |
---|
function TNTFSDiskIndex.GetBorrow(AEntry:TBtreeObject):TBtreeObject;
Note | Always borrow from the Righthand neighbour if available |
---|
function TNTFSDiskIndex.GetTarget(ADrop:TBtreeObject; ALeft:Boolean):TBtreeObject;
Note | If drop has no child then GetTarget will return the neighbour itself
No account is made of whether the leftmost or rightmost nodes have room for the demoted parent, the caller must check for require push or split on the target after drop. |
---|
function TNTFSDiskIndex.PushNode(AEntry:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.SplitNode(AEntry:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.DropNode(AEntry,ADrop,ATarget:TBtreeObject; ALeft:Boolean):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.DropNodeOld(AEntry,ADrop:TBtreeObject; ALeft:Boolean):Boolean;
Note | Changed to account for Target |
---|
function TNTFSDiskIndex.MergeNode(AEntry,AMerge:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.BorrowEntry(AEntry,ABorrow:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.SwapEntry(AEntry,ASwap:TBtreeObject; ALeft:Boolean):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.SetParentEntry(AEntry,AParent:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.DeleteBlank(ABlank:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.AttachBlank(ABlank:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.DetachBlank(ABlank:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.AttachEntry(AEntry:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.DetachEntry(AEntry:TBtreeObject):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.RequirePush(AEntry:TBtreeObject):Boolean;
Note | Entry is the key that was inserted
Or a key in a parent node of the node where the entry was inserted
|
---|
function TNTFSDiskIndex.RequireSplit(AEntry:TBtreeObject):Boolean;
Note | Entry is the key that was inserted
Or a key in a parent node of the node where the entry was inserted
|
---|
function TNTFSDiskIndex.RequireDrop(AEntry:TBtreeObject):Boolean;
Note | Entry is the start key of the node where the entry was removed
Or a key in a parent node of the node where the entry was removed
|
---|
function TNTFSDiskIndex.RequireMerge(AEntry:TBtreeObject):Boolean;
Note | Entry is the start key of the node where the entry was removed
Or a key in a parent node of the node where the entry was removed
|
---|
function TNTFSDiskIndex.RequireBorrow(AEntry:TBtreeObject):Boolean;
Note | Entry is the start key of the node where the entry was removed
Or a key in a parent node of the node where the entry was removed
|
---|
function TNTFSDiskIndex.NodeCount:Integer;
Note | None documented |
---|
function TNTFSDiskIndex.CreateKey(ANode:TNTFSDiskNode; ABlank:Boolean):TNTFSDiskKey;
Note | None documented |
---|
function TNTFSDiskIndex.DestroyKey(AKey:TNTFSDiskKey):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.NewKey(AKey,AData:Pointer; AKeySize,ADataSize:Word):TNTFSDiskKey;
Note | None documented |
---|
function TNTFSDiskIndex.NewKeyEx(AKey,AData,APadding:Pointer; AKeySize,ADataSize,APaddingSize:Word):TNTFSDiskKey;
Note | None documented |
---|
function TNTFSDiskIndex.AddKey(AParent,AKey:TNTFSDiskKey):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.InsertKey(AKey:TNTFSDiskKey):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.RemoveKey(AKey:TNTFSDiskKey):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.CreateNode(ANew:Boolean):TNTFSDiskNode;
Note | None documented |
---|
function TNTFSDiskIndex.DestroyNode(ANode:TNTFSDiskNode):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.NewNode(const ARecordNumber:Int64):TNTFSDiskNode;
Note | None documented |
---|
function TNTFSDiskIndex.GetNode(const ARecordNumber:Int64):TNTFSDiskNode;
Note | None documented |
---|
function TNTFSDiskIndex.DeleteNode(ANode:TNTFSDiskNode):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.RemoveNode(ANode:TNTFSDiskNode):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.UpdateNodes(AVersion:Word):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.FindKey(AValue:Pointer; ASize:Word):TNTFSDiskKey;
Note | None documented |
---|
function TNTFSDiskIndex.ReadRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.WriteRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.ReadKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.WriteKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.ReaderLock:Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.ReaderUnlock:Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.WriterLock:Boolean;
Note | None documented |
---|
function TNTFSDiskIndex.WriterUnlock:Boolean;
Note | None documented |
---|
Return to Unit Reference