TNTFSDiskItem

From Ultibo.org
Jump to: navigation, search

Return to Unit NTFSClass


Description


To be documented

Class definitions



TNTFSDiskItem = class(TListObject)

Note: Data of attribute $ATTRIBUTE_LIST
 
constructor Create(ALocalLock:TMutexHandle; AParent:TNTFSDiskAttribute);  
destructor Destroy; override;  
private
FLocalLock:TMutexHandle;  
 
FStatus:LongWord;  
 
FItemSize:Word; Record length
FStartVCN:Int64; Starting VCN if non resident
FFileReference:Int64; File Reference of the attribute
FAttributeType:LongWord; Attribute Type
FAttributeId:Word; Attribute Id
FAttributeName:String; Name in Unicode (if NameLength > 0)
 
FParent:TNTFSDiskAttribute; Attribute list owning this item
FAttribute:TNTFSDiskAttribute; Attribute pointed to by this item
 
FAttributeHash:LongWord;  
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function GetInvalid:Boolean;  
procedure SetInvalid(AValue:Boolean);  
 
function GetAttributeName:String;  
procedure SetAttributeName(const AAttributeName:String);  
procedure SetAttribute(AAttribute:TNTFSDiskAttribute);  
 
function Compare(AItem:TNTFSDiskItem):Integer; virtual;  
public
property Invalid:Boolean read GetInvalid write SetInvalid; Item points to invalid file record or attribute
 
property ItemSize:Word read FItemSize write FItemSize;  
property StartVCN:Int64 read FStartVCN write FStartVCN;  
property FileReference:Int64 read FFileReference write FFileReference;  
property AttributeType:LongWord read FAttributeType write FAttributeType;  
property AttributeId:Word read FAttributeId write FAttributeId;  
property AttributeName:String read GetAttributeName write SetAttributeName;  
 
property Parent:TNTFSDiskAttribute read FParent;  
property Attribute:TNTFSDiskAttribute read FAttribute write SetAttribute;  
 
property AttributeHash:LongWord read FAttributeHash;  
 
function RecordNumber:Int64;  
 
function AttributeNameSize:Word;  
function AttributeNameLength:Byte; Name length
function AttributeNameOffset:Byte; Offset to Name
 
function UpdateItem:Boolean;  
 
function CalculatedSize(AVersion:Word):Word;  
 
function ReadItem(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  
function WriteItem(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;  


Function declarations



constructor TNTFSDiskItem.Create(ALocalLock:TMutexHandle; AParent:TNTFSDiskAttribute);
Description: To be documented
Note None documented


destructor TNTFSDiskItem.Destroy;
Description: To be documented
Note None documented


function TNTFSDiskItem.AcquireLock:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskItem.ReleaseLock:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskItem.GetInvalid:Boolean;
Description: To be documented
Note None documented


procedure TNTFSDiskItem.SetInvalid(AValue:Boolean);
Description: To be documented
Note None documented


function TNTFSDiskItem.GetAttributeName:String;
Description: To be documented
Note None documented


procedure TNTFSDiskItem.SetAttributeName(const AAttributeName:String);
Description: To be documented
Note None documented


procedure TNTFSDiskItem.SetAttribute(AAttribute:TNTFSDiskAttribute);
Description: To be documented
Note None documented


function TNTFSDiskItem.Compare(AItem:TNTFSDiskItem):Integer;
Description: Compare item by type, name and vcn for sort order
Note The passed item is the first value in a standard compare

Id is not used for sort order as it is unique per file record
Name is compared using a case insensitive compare method


function TNTFSDiskItem.RecordNumber:Int64;
Description: To be documented
Note None documented


function TNTFSDiskItem.AttributeNameSize:Word;
Description: To be documented
Note None documented


function TNTFSDiskItem.AttributeNameLength:Byte;
Description: To be documented
Note None documented


function TNTFSDiskItem.AttributeNameOffset:Byte;
Description: To be documented
Note None documented


function TNTFSDiskItem.UpdateItem:Boolean;
Description: To be documented
Note None documented


function TNTFSDiskItem.CalculatedSize(AVersion:Word):Word;
Description: To be documented
Note Calculated Size includes any rounding required for alignment


function TNTFSDiskItem.ReadItem(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Read the item data from the supplied buffer at the supplied offset
Note None documented


function TNTFSDiskItem.WriteItem(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Write the item data to the supplied buffer at the supplied offset
Note None documented


Return to Unit Reference