TCDFSFileSystem
Return to Unit CDFS
Description
To be documented
Class definitions
TCDFSFileSystem = class(TFileSystem)
constructor Create(ADriver:TFileSysDriver; AVolume:TDiskVolume; ADrive:TDiskDrive);
|
|
destructor Destroy; override;
|
|
private
| |
FCDFSType:TCDFSType;
|
|
FSwapSerial:Boolean;
|
|
FVolumeFlags:LongWord;
|
Volume flags |
FTreesLoaded:Boolean;
|
|
FBlocksLoaded:Boolean;
|
|
FCatalogsLoaded:Boolean;
|
|
FCatalogsLoading:Boolean;
|
|
FBlockWrite:Boolean;
|
|
FTreesPrepared:Boolean;
|
|
FCatalogsChecked:Boolean;
|
|
FLogicalBlockSize:Word;
|
Size of a logical block on disk |
FLogicalBlockCount:LongWord;
|
Number of logical blocks on disk |
FSectorsPerCluster:LongWord;
|
Usually 1,2,4,8,16,32,64,128 etc |
FDataStartCluster:LongWord;
|
Usually 16 (First cluster of Data Area) |
FBootStartCluster:LongWord;
|
Usually 17 (Cluster of the Boot Descriptor) |
FRootStartCluster:LongWord;
|
Pointed to by Primary Descriptor |
FBlockShiftCount:Word;
|
Shift count for Cluster <-> BlockNo |
FSectorShiftCount:Word;
|
Shift count for Sector <-> Cluster |
FClusterShiftCount:Word;
|
Shift count for Cluster <-> Bytes |
FEntriesPerBlock:LongWord;
|
Number of Cluster entries per Block of bitmap |
FClustersPerBlock:LongWord;
|
Number of Clusters per Block of bitmap entries |
FTotalBlockCount:LongWord;
|
Total number of Blocks in bitmap |
FTotalClusterCount:LongWord;
|
Total number of Clusters on volume |
FLastFreeCluster:LongWord;
|
Or cdfsUnknownCluster if not known |
FFreeClusterCount:LongWord;
|
Or cdfsUnknownCluster if not known |
FClusterSize:LongWord;
|
Size of a Cluster in Bytes (Max 65536 > Word) |
FBoot:TCDFSDiskDescriptor;
|
|
FPrimary:TCDFSDiskDescriptor;
|
|
FSupplementary:TCDFSDiskDescriptor;
|
|
FHeaders:TFileSysList;
|
List of Catalog Headers |
FExtensions:TFileSysList;
|
List of Catalog Extensions |
FDescriptors:TFileSysList;
|
List of Volume Descriptors |
FHeaderLocal:TMutexHandle;
|
Local Lock shared by all Catalog Headers |
FExtensionLocal:TMutexHandle;
|
Local Lock shared by all Catalog Extensions |
FDescriptorLocal:TMutexHandle;
|
Local Lock shared by all Volume Descriptors |
FExtendedLocal:TMutexHandle;
|
Local Lock shared by all Extended Attributes |
FPathLock:TSynchronizerHandle;
|
Lock shared by all Path lists |
FReadBuffer:Pointer;
|
Buffer for partial cluster entry reads (Cluster size) |
FReadLock:TMutexHandle;
|
Lock for read buffer |
FWriteBuffer:Pointer;
|
Buffer for partial cluster entry writes (Cluster size) |
FWriteLock:TMutexHandle;
|
Lock for write buffer |
FClusterBuffer:Pointer;
|
Buffer of exactly cluster size |
FClusterLock:TMutexHandle;
|
Lock for cluster buffer |
function ReadLock:Boolean;
|
|
function ReadUnlock:Boolean;
|
|
function WriteLock:Boolean;
|
|
function WriteUnlock:Boolean;
|
|
function ClusterLock:Boolean;
|
|
function ClusterUnlock:Boolean;
|
|
function LoadTree(AEntry:TDiskEntry):Boolean;
|
|
function MarkTree(AEntry:TDiskEntry):Boolean;
|
|
function PrepareTree(AEntry:TDiskEntry):Boolean;
|
|
function PrepareTable(ATable:TDiskTable):Boolean;
|
|
function PrepareTrees:Boolean;
|
|
function CheckCatalogs:Boolean;
|
|
function LocatePath(ATable:TCDFSDiskTable; APathNumber:Word):TCDFSDiskPath;
|
|
function LocateEntry(AEntry:TCDFSDiskEntry; AStartCluster:LongWord):TCDFSDiskEntry;
|
|
function LoadVolumeFlags:LongWord;
|
|
function FillClusters(ACluster:LongWord; ACount:Word; AValue:Byte):Boolean;
|
|
function ReadClusters(ACluster:LongWord; ACount:Word; var ABuffer):Boolean;
|
|
function WriteClusters(ACluster:LongWord; ACount:Word; const ABuffer):Boolean;
|
|
function TestClusters(ACluster,ACount:LongWord):Boolean;
|
|
function MarkClusters(ACluster,ACount:LongWord; AUsed:Boolean):Boolean;
|
|
function AllocClusters(var ACluster:LongWord; ACount:LongWord):Boolean;
|
|
function ReleaseClusters(ACluster,ACount:LongWord):Boolean;
|
|
function GetNextFreeCluster:LongWord;
|
Return is a Cluster |
function GetFreeClusterCount:LongWord;
|
|
function TestBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
|
|
function MarkBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord; AUsed:Boolean):Boolean;
|
|
function AllocBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
|
|
function ReleaseBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
|
|
function GetBlockNextFree(ABlock:TCDFSDiskBlock; AStart:LongWord):LongWord;
|
|
function GetBlockFreeCount(ABlock:TCDFSDiskBlock):LongWord;
|
|
function TestBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord):Boolean;
|
|
function MarkBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):Boolean;
|
|
function AllocBitmap(ABuffer:Pointer; ASize:LongWord; AStart,ACount:LongWord):Boolean;
|
|
function ReleaseBitmap(ABuffer:Pointer; ASize:LongWord; AStart,ACount:LongWord):Boolean;
|
|
function GetBitmapNextFree(ABuffer:Pointer; ASize,AStart:LongWord):LongWord;
|
|
function GetBitmapFreeCount(ABuffer:Pointer; ASize:LongWord):LongWord;
|
|
function GetTableDataFree(ATable:TDiskTable):LongWord;
|
|
function GetEntryDataFree(AEntry:TDiskEntry):LongWord;
|
|
function GetCatalogDataFree(ADescriptor:TCDFSDiskDescriptor):LongWord;
|
|
function GetPreviousPath(ATable:TCDFSDiskTable; APath:TCDFSDiskPath):TCDFSDiskPath;
|
|
function GetPreviousEntry(AParent,AEntry:TCDFSDiskEntry):TCDFSDiskEntry;
|
|
function GetSectorsPerCluster(AClusterSize:LongWord):LongWord;
|
|
function GetBlockShiftCount(AClusterSize:LongWord):Word;
|
|
function GetSectorShiftCount(AClusterSize:LongWord):Word;
|
|
function GetClusterShiftCount(AClusterSize:LongWord):Word;
|
|
function GetEntriesPerBlock(AClusterSize:LongWord):LongWord;
|
|
function GetClustersPerBlock(AClusterSize:LongWord):LongWord;
|
|
function GetTotalBlockCount(ATotalClusterCount:LongWord):LongWord;
|
|
function RenumberPaths(ATable:TDiskTable):Boolean;
|
|
function ComparePath(APath1,APath2:TCDFSDiskPath; AUnicode:Boolean):Integer;
|
|
function CompareEntry(AEntry1,AEntry2:TCDFSDiskEntry; AUnicode:Boolean):Integer;
|
|
function PadString(const AString:String; ALength:Integer; APrefix,AUnicode:Boolean):String;
|
|
function CompareString(const AString1,AString2:String; AReverse:Boolean):Integer;
|
|
function ChecksumValidationRecord(AValidation:PELTORITOValidationRecord):Word;
|
|
function RecordToPath(ARecord:Pointer; APath:TCDFSDiskPath; AUnicode,AEndian:Boolean):Boolean;
|
|
function PathToRecord(APath:TCDFSDiskPath; ARecord:Pointer; AUnicode,AEndian:Boolean):Boolean;
|
|
function RecordToEntry(ARecord:Pointer; AEntry:TCDFSDiskEntry; AUnicode:Boolean):Boolean;
|
|
function EntryToRecord(AEntry:TCDFSDiskEntry; ARecord:Pointer; AUnicode:Boolean):Boolean;
|
|
function CDFSTypeToFileSysType(ACDFSType:TCDFSType):TFileSysType;
|
|
protected
| |
function LoadMaxFile:Integer; override;
|
|
function LoadMaxPath:Integer; override;
|
|
function LoadAttributes:LongWord; override;
|
|
function LoadSystemName:String; override;
|
|
function LoadVolumeName:String; override;
|
|
function LoadVolumeSerial:LongWord; override;
|
|
function LoadFileSysType:TFileSysType; override;
|
|
function SetVolumeName(const AName:String):Boolean;
|
|
function SetVolumeSerial(ASerial:LongWord):Boolean;
|
|
function ReadEntry(AParent,AEntry:TDiskEntry; var ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer; override;
|
|
function WriteEntry(AParent,AEntry:TDiskEntry; const ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer; override;
|
|
function LoadTrees:Boolean;
|
Not override |
function LoadTables:Boolean; override;
|
|
function LoadBlocks:Boolean; override;
|
|
function LoadDescriptors:Boolean;
|
Not override |
function LoadRoots:Boolean;
|
Not override |
function LoadPaths(ATable:TCDFSDiskTable):Boolean;
|
Not override |
function LoadEntries(AParent:TDiskEntry):Boolean; override;
|
|
function LoadCatalogs:Boolean; override;
|
|
function SetPaths(ATable:TCDFSDiskTable):Boolean;
|
Not override |
function SetEntries(AParent:TDiskEntry):Boolean;
|
Not override |
function SetCatalogs:Boolean;
|
Not override |
function LoadTable(ATableNo:LongWord):Boolean; override;
|
|
function LoadBlock(ABlockNo:LongWord):Boolean; override;
|
|
function LoadDescriptor(ABuffer:Pointer; ACluster:LongWord):Boolean;
|
Not override |
function LoadRoot(ADescriptor:TCDFSDiskDescriptor):Boolean;
|
Not override |
function LoadPath(ATable:TCDFSDiskTable; ABuffer:Pointer; AOffset:LongWord; ANumber:Word):Boolean;
|
Not override |
function LoadEntry(AParent:TCDFSDiskEntry; ABuffer:Pointer; AOffset,ACluster:LongWord):Boolean;
|
Not override |
function LoadHeader(ABuffer:Pointer; AOffset,ACluster:LongWord; AHeaderNo:LongWord):Boolean;
|
Not override |
function LoadCatalog(ABuffer:Pointer; AOffset,ACluster:LongWord; ACatalogNo:LongWord; AInitial:Boolean):Boolean;
|
Not override |
function LoadExtension(ABuffer:Pointer; AOffset,ACluster:LongWord; AExtensionNo:LongWord):Boolean;
|
Not override |
function LoadExtended(AEntry:TDiskEntry):Boolean;
|
Not override |
function AddDescriptor(AType:Byte):TCDFSDiskDescriptor;
|
Not override |
function RemoveDescriptor(ADescriptor:TCDFSDiskDescriptor):Boolean;
|
Not override |
function AddPath(ATable:TDiskTable; AParentNumber:Word; const AName:String; AStartCluster:LongWord):TCDFSDiskPath;
|
Not override |
function RemovePath(ATable:TDiskTable; APath:TCDFSDiskPath):Boolean;
|
Not override |
function RenamePath(ATable:TDiskTable; APath:TCDFSDiskPath; const AName:String):Boolean;
|
Not override |
function MovePath(ATable:TDiskTable; ADestNumber:Word; APath:TCDFSDiskPath):Boolean;
|
Not override |
function AddEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry; override;
|
|
function AddEntryEx(AParent:TDiskEntry; const AName,AAltName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry; override;
|
|
function RemoveEntry(AParent,AEntry:TDiskEntry):Boolean; override;
|
|
function RenameEntry(AParent,AEntry:TDiskEntry; const AName:String):Boolean; override;
|
|
function RenameEntryEx(AParent,AEntry:TDiskEntry; const AAltName:String):Boolean; override;
|
|
function MoveEntry(ASource,ADest,AEntry:TDiskEntry):Boolean; override;
|
|
function AddCatalog(AEntry:TDiskEntry; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):TDiskCatalog; override;
|
|
function RemoveCatalog(ACatalog:TDiskCatalog):Boolean; override;
|
|
function GetNextHeaderNo:LongWord;
|
Not override |
function GetMaxHeaderNo:LongWord;
|
Not override |
function GetNextHeaderOffset:LongWord;
|
Not override |
function GetNextHeaderCluster:LongWord;
|
Not override |
function GetNextCatalogOffset:LongWord;
|
Not override |
function GetNextCatalogCluster:LongWord;
|
Not override |
function SetTable(ATable:TDiskTable):Boolean; override;
|
|
function SetBlock(ABlock:TDiskBlock):Boolean; override;
|
|
function SetDescriptor(ADescriptor:TCDFSDiskDescriptor):Boolean;
|
Not override |
function SetRoot(ADescriptor:TCDFSDiskDescriptor; ARoot:TDiskEntry):Boolean;
|
Not override |
function SetPath(ATable:TDiskTable; APath:TCDFSDiskPath; ABuffer:Pointer):Boolean;
|
Not override |
function SetEntry(AParent,AEntry:TDiskEntry):Boolean; override;
|
|
function SetHeader(AHeader:TCDFSDiskHeader):Boolean;
|
Not override |
function SetCatalog(ACatalog:TDiskCatalog):Boolean; override;
|
|
function SetExtension(AExtension:TCDFSDiskExtension):Boolean;
|
Not override |
function SetExtended(AEntry:TDiskEntry; AExtended:TCDFSDiskExtended):Boolean;
|
Not override |
function SizeEntry(AParent,AEntry:TDiskEntry; const ASize:Int64):Boolean; override;
|
|
function GetBlock(ABlockNo:LongWord):TDiskBlock; override;
|
|
function GetBlockEx(ABlockNo:LongWord; AWrite:Boolean):TDiskBlock; override;
|
|
function GetDescriptor(AType,AInstance:Byte):TCDFSDiskDescriptor;
|
Not override |
function GetDescriptorEx(AType,AInstance:Byte; AWrite:Boolean):TCDFSDiskDescriptor;
|
Not override |
function GetRoot(ADescriptor:TCDFSDiskDescriptor):TDiskEntry;
|
Not override |
function GetPath(ATable:TDiskTable; AParentNumber:Word; const AName:String):TCDFSDiskPath;
|
Not override |
function GetHeader(AHeaderNo:LongWord):TCDFSDiskHeader;
|
Not override |
function GetHeaderEx(AHeaderNo:LongWord; AWrite:Boolean):TCDFSDiskHeader;
|
Not override |
function GetExtension(AExtensionNo:LongWord):TCDFSDiskExtension;
|
Not override |
function GetExtensionEx(AExtensionNo:LongWord; AWrite:Boolean):TCDFSDiskExtension;
|
Not override |
function GetExtended(AEntry:TDiskEntry):TCDFSDiskExtended;
|
Not override |
function GetVersion(const AName:String):String;
|
|
function StripDot(const AName:String):String;
|
|
function StripVersion(const AName:String):String;
|
|
function CompareName(const AName,AMatch:String; AWildcard:Boolean):Boolean; override;
|
|
function CompareSequence(const ASequence; const ACompare; ASize:Integer):Boolean;
|
|
function CompareIdentifier(const AIdentifier; const ACompare; ASize:Integer):Boolean;
|
|
function CalculateVolumeSerial(ABuffer:Pointer; ASize:Integer):LongWord;
|
|
public
| |
property ReadOnly:Boolean read FReadOnly write FReadOnly;
|
|
property LongNames:Boolean read FLongNames write FLongNames;
|
|
property CasePreserved:Boolean read FCasePreserved write FCasePreserved;
|
|
property UnicodeNames:Boolean read FUnicodeNames write FUnicodeNames;
|
|
property SwapSerial:Boolean read FSwapSerial write FSwapSerial;
|
|
function FileSystemInit:Boolean; override;
|
|
function MountFileSystem:Boolean; override;
|
|
function DismountFileSystem:Boolean; override;
|
|
function InitializeFileSystem(ASectorsPerCluster:LongWord; AFileSysType:TFileSysType):Boolean; override;
|
|
function GetDriveLabel:String; override;
|
|
function SetDriveLabel(const ALabel:String):Boolean; override;
|
|
function SetDriveSerial(ASerial:LongWord):Boolean; override;
|
|
function GetDriveFreeSpaceEx:Int64; override;
|
|
function GetDriveTotalSpaceEx:Int64; override;
|
|
function GetDriveInformation(var AClusterSize:LongWord; var ATotalClusterCount,AFreeClusterCount:Int64):Boolean; override;
|
Function declarations
constructor TCDFSFileSystem.Create(ADriver:TFileSysDriver; AVolume:TDiskVolume; ADrive:TDiskDrive);
Note | None documented |
---|
destructor TCDFSFileSystem.Destroy;
Note | None documented |
---|
function TCDFSFileSystem.ReadLock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.ReadUnlock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.WriteLock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.WriteUnlock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.ClusterLock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.ClusterUnlock:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadTree(AEntry:TDiskEntry):Boolean;
Note | Should only by called by LoadTrees |
---|
function TCDFSFileSystem.MarkTree(AEntry:TDiskEntry):Boolean;
Note | Should only by called by LoadBlocks |
---|
function TCDFSFileSystem.PrepareTree(AEntry:TDiskEntry):Boolean;
Note | Should only by called by PrepareTrees |
---|
function TCDFSFileSystem.PrepareTable(ATable:TDiskTable):Boolean;
Note | Should only by called by PrepareTrees
Caller must hold the tables lock |
---|
function TCDFSFileSystem.PrepareTrees:Boolean;
Note | Releasing the entry or path simply implies setting the bytes on disk to zero
Uses PrepareTree and PrepareTable above
|
---|
function TCDFSFileSystem.CheckCatalogs:Boolean;
Note | If any catalogs have zero clusters allocated then LoadBlocks will not present an accurate map of the disk and AllocClusters cannot reliably assign clusters
Should only be called by AllocClusters |
---|
function TCDFSFileSystem.LocatePath(ATable:TCDFSDiskTable; APathNumber:Word):TCDFSDiskPath;
Note | Should only be called by LoadPath, AddPath and MovePath
Caller must hold the tables and paths lock |
---|
function TCDFSFileSystem.LocateEntry(AEntry:TCDFSDiskEntry; AStartCluster:LongWord):TCDFSDiskEntry;
Note | Should only be called by LoadCatalog
Caller must hold the entries lock |
---|
function TCDFSFileSystem.LoadVolumeFlags:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.FillClusters(ACluster:LongWord; ACount:Word; AValue:Byte):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.ReadClusters(ACluster:LongWord; ACount:Word; var ABuffer):Boolean;
Note | Performs conversion of Cluster to Sector based on Offsets
Sector is relative to StartSector of the FileSystem |
---|
function TCDFSFileSystem.WriteClusters(ACluster:LongWord; ACount:Word; const ABuffer):Boolean;
Note | Performs conversion of Cluster to Sector based on Offsets
Sector is relative to StartSector of the FileSystem |
---|
function TCDFSFileSystem.TestClusters(ACluster,ACount:LongWord):Boolean;
Note | Returns success if Count is zero
The Bitmap is not stored in CDFS and is only used when ReadOnly is False
|
---|
function TCDFSFileSystem.MarkClusters(ACluster,ACount:LongWord; AUsed:Boolean):Boolean;
Note | Returns success if Count is zero
The Bitmap is not stored in CDFS and is only used when ReadOnly is False
|
---|
function TCDFSFileSystem.AllocClusters(var ACluster:LongWord; ACount:LongWord):Boolean;
Note | The Bitmap is not stored in CDFS and is only used when ReadOnly is False |
---|
function TCDFSFileSystem.ReleaseClusters(ACluster,ACount:LongWord):Boolean;
Note | Returns success if Count is zero
The Bitmap is not stored in CDFS and is only used when ReadOnly is False |
---|
function TCDFSFileSystem.GetNextFreeCluster:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetFreeClusterCount:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.TestBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
Start | Start is the cluster number in the block to start from
Start must be greater than or equal to block cluster |
---|---|
Note | Should only be called by TestClusters
Caller must hold the blocks lock |
function TCDFSFileSystem.MarkBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord; AUsed:Boolean):Boolean;
Start | Start is the cluster number in the block to start from
Start must be greater than or equal to block cluster |
---|---|
Note | Should only be called by MarkClusters
Caller must hold the blocks lock |
function TCDFSFileSystem.AllocBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
Note | Caller must hold the blocks lock |
---|
function TCDFSFileSystem.ReleaseBlock(ABlock:TCDFSDiskBlock; AStart,ACount:LongWord):Boolean;
Note | Caller must hold the blocks lock |
---|
function TCDFSFileSystem.GetBlockNextFree(ABlock:TCDFSDiskBlock; AStart:LongWord):LongWord;
Start | Start is the cluster number in the block to start from
Start must be greater than or equal to block cluster |
---|---|
Note | Should only be called by GetNextFreeCluster
Caller must hold the blocks lock |
function TCDFSFileSystem.GetBlockFreeCount(ABlock:TCDFSDiskBlock):LongWord;
Note | Should only be called by GetFreeClusterCount
Caller must hold the blocks lock |
---|
function TCDFSFileSystem.TestBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord):Boolean;
Size | Size is the total number of bits in the bitmap |
---|---|
Start | Start is the bit number in the bitmap to start from |
Count | Count is the number of bits in the bitmap to be marked |
Note | Should only be called by TestBlock
Bitmaps are a multiple of 64 bits in size but free and used blocks are marked using an array of bytes in little endian order
|
function TCDFSFileSystem.MarkBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):Boolean;
Size | Size is the total number of bits in the bitmap |
---|---|
Start | Start is the bit number in the bitmap to start from (0 if first bit) |
Count | Count is the number of bits in the bitmap to be marked |
Note | Should only be called by MarkBlock
Bitmaps are a multiple of 64 bits in size but free and used blocks are marked using an array of bytes in little endian order
|
function TCDFSFileSystem.AllocBitmap(ABuffer:Pointer; ASize:LongWord; AStart,ACount:LongWord):Boolean;
Note | Caller must hold the blocks lock |
---|
function TCDFSFileSystem.ReleaseBitmap(ABuffer:Pointer; ASize:LongWord; AStart,ACount:LongWord):Boolean;
Note | Caller must hold the blocks lock |
---|
function TCDFSFileSystem.GetBitmapNextFree(ABuffer:Pointer; ASize,AStart:LongWord):LongWord;
Size | Size is the total number of bits in the bitmap |
---|---|
Start | Start is the bit number in the bitmap to start from |
Note | Should only be called by GetBlockNextFree
Bitmaps are a multiple of 64 bits in size but free and used blocks are marked using an array of bytes in little endian order
|
function TCDFSFileSystem.GetBitmapFreeCount(ABuffer:Pointer; ASize:LongWord):LongWord;
Size | Size is the total number of bits in the bitmap |
---|---|
Note | Should only be called by GetBlockFreeCount
Bitmaps are a multiple of 64 bits in size but free and used blocks are marked using an array of bytes in little endian order
|
function TCDFSFileSystem.GetTableDataFree(ATable:TDiskTable):LongWord;
Note | Caller must hold the tables and paths lock |
---|
function TCDFSFileSystem.GetEntryDataFree(AEntry:TDiskEntry):LongWord;
Note | Caller must hold the entries lock |
---|
function TCDFSFileSystem.GetCatalogDataFree(ADescriptor:TCDFSDiskDescriptor):LongWord;
Note | Caller must hold the descriptors, catalogs, headers and extensions lock. |
---|
function TCDFSFileSystem.GetPreviousPath(ATable:TCDFSDiskTable; APath:TCDFSDiskPath):TCDFSDiskPath;
Note | Caller must hold the tables and paths lock |
---|
function TCDFSFileSystem.GetPreviousEntry(AParent,AEntry:TCDFSDiskEntry):TCDFSDiskEntry;
Note | Caller must hold the entries lock |
---|
function TCDFSFileSystem.GetSectorsPerCluster(AClusterSize:LongWord):LongWord;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetBlockShiftCount(AClusterSize:LongWord):Word;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetSectorShiftCount(AClusterSize:LongWord):Word;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetClusterShiftCount(AClusterSize:LongWord):Word;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetEntriesPerBlock(AClusterSize:LongWord):LongWord;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetClustersPerBlock(AClusterSize:LongWord):LongWord;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.GetTotalBlockCount(ATotalClusterCount:LongWord):LongWord;
Note | Only called during volume mount and initialization |
---|
function TCDFSFileSystem.RenumberPaths(ATable:TDiskTable):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.ComparePath(APath1,APath2:TCDFSDiskPath; AUnicode:Boolean):Integer;
Note | Path Sort Ordering:
- Only Directories are represented
|
---|
function TCDFSFileSystem.CompareEntry(AEntry1,AEntry2:TCDFSDiskEntry; AUnicode:Boolean):Integer;
Note | Entry Sort Ordering:
- Dot is always first
|
---|
function TCDFSFileSystem.PadString(const AString:String; ALength:Integer; APrefix,AUnicode:Boolean):String;
Note | None documented |
---|
function TCDFSFileSystem.CompareString(const AString1,AString2:String; AReverse:Boolean):Integer;
Note | None documented |
---|
function TCDFSFileSystem.ChecksumValidationRecord(AValidation:PELTORITOValidationRecord):Word;
Note | None documented |
---|
function TCDFSFileSystem.RecordToPath(ARecord:Pointer; APath:TCDFSDiskPath; AUnicode,AEndian:Boolean):Boolean;
Note | Should only be called by LoadPath
Caller must hold the tables and paths lock |
---|
function TCDFSFileSystem.PathToRecord(APath:TCDFSDiskPath; ARecord:Pointer; AUnicode,AEndian:Boolean):Boolean;
Note | Should only be called by SetPath
Caller must hold the tables and paths lock |
---|
function TCDFSFileSystem.RecordToEntry(ARecord:Pointer; AEntry:TCDFSDiskEntry; AUnicode:Boolean):Boolean;
Note | Should only be called by LoadEntry and LoadRoot}
{Note: Caller must hold the entries lock |
---|
function TCDFSFileSystem.EntryToRecord(AEntry:TCDFSDiskEntry; ARecord:Pointer; AUnicode:Boolean):Boolean;
Note | Should only be called by SetEntry and SetRoot
Caller must hold the entries lock |
---|
function TCDFSFileSystem.CDFSTypeToFileSysType(ACDFSType:TCDFSType):TFileSysType;
Note | None documented |
---|
function TCDFSFileSystem.LoadMaxFile:Integer;
Note | None documented |
---|
function TCDFSFileSystem.LoadMaxPath:Integer;
Note | None documented |
---|
function TCDFSFileSystem.LoadAttributes:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.LoadSystemName:String;
Note | None documented |
---|
function TCDFSFileSystem.LoadVolumeName:String;
Note | None documented |
---|
function TCDFSFileSystem.LoadVolumeSerial:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.LoadFileSysType:TFileSysType;
Note | None documented |
---|
function TCDFSFileSystem.SetVolumeName(const AName:String):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetVolumeSerial(ASerial:LongWord):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.ReadEntry(AParent,AEntry:TDiskEntry; var ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer;
Note | The caller must ensure the entry is large enough or the read will fail
The offset and value parameters are not used by CDFS |
---|
function TCDFSFileSystem.WriteEntry(AParent,AEntry:TDiskEntry; const ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer;
Note | The caller must ensure the entry is large enough or the write will fail
The offset and value parameters are not used by CDFS |
---|
function TCDFSFileSystem.LoadTrees:Boolean;
Note | Should only be called by PrepareTrees and LoadBlocks |
---|
function TCDFSFileSystem.LoadTables:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadBlocks:Boolean;
Note | Should only be called by Alloc/ReleaseClusters and GetNextFreeCluster/GetFreeClusterCount |
---|
function TCDFSFileSystem.LoadDescriptors:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadRoots:Boolean;
Note | Caller must hold the descriptors lock |
---|
function TCDFSFileSystem.LoadPaths(ATable:TCDFSDiskTable):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.LoadEntries(AParent:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadCatalogs:Boolean;
Note | Includes LoadHeaders/LoadExtensions |
---|
function TCDFSFileSystem.SetPaths(ATable:TCDFSDiskTable):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.SetEntries(AParent:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetCatalogs:Boolean;
Note | Includes SetHeaders/SetExtensions |
---|
function TCDFSFileSystem.LoadTable(ATableNo:LongWord):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadBlock(ABlockNo:LongWord):Boolean;
Note | LoadBlock does not populate the Free/Used data in the Bitmap, all bits begin as Free. |
---|
function TCDFSFileSystem.LoadDescriptor(ABuffer:Pointer; ACluster:LongWord):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadRoot(ADescriptor:TCDFSDiskDescriptor):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadPath(ATable:TCDFSDiskTable; ABuffer:Pointer; AOffset:LongWord; ANumber:Word):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.LoadEntry(AParent:TCDFSDiskEntry; ABuffer:Pointer; AOffset,ACluster:LongWord):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.LoadHeader(ABuffer:Pointer; AOffset,ACluster:LongWord; AHeaderNo:LongWord):Boolean;
Note | Should only be called by LoadCatalogs |
---|
function TCDFSFileSystem.LoadCatalog(ABuffer:Pointer; AOffset,ACluster:LongWord; ACatalogNo:LongWord; AInitial:Boolean):Boolean;
Note | Should only be called by LoadCatalogs |
---|
function TCDFSFileSystem.LoadExtension(ABuffer:Pointer; AOffset,ACluster:LongWord; AExtensionNo:LongWord):Boolean;
Note | Should only be called by LoadCatalogs |
---|
function TCDFSFileSystem.LoadExtended(AEntry:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.AddDescriptor(AType:Byte):TCDFSDiskDescriptor;
Note | None documented |
---|
function TCDFSFileSystem.RemoveDescriptor(ADescriptor:TCDFSDiskDescriptor):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.AddPath(ATable:TDiskTable; AParentNumber:Word; const AName:String; AStartCluster:LongWord):TCDFSDiskPath;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.RemovePath(ATable:TDiskTable; APath:TCDFSDiskPath):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.RenamePath(ATable:TDiskTable; APath:TCDFSDiskPath; const AName:String):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.MovePath(ATable:TDiskTable; ADestNumber:Word; APath:TCDFSDiskPath):Boolean;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.AddEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry;
Reference | Add a reference on the returned entry if True |
---|
function TCDFSFileSystem.AddEntryEx(AParent:TDiskEntry; const AName,AAltName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry;
Reference | Add a reference on the returned entry if True |
---|---|
Note | If AltName already exists then a generated one will be provided, will not fail due to AltName. |
function TCDFSFileSystem.RemoveEntry(AParent,AEntry:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.RenameEntry(AParent,AEntry:TDiskEntry; const AName:String):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.RenameEntryEx(AParent,AEntry:TDiskEntry; const AAltName:String):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.MoveEntry(ASource,ADest,AEntry:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.AddCatalog(AEntry:TDiskEntry; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):TDiskCatalog;
Note | None documented |
---|
function TCDFSFileSystem.RemoveCatalog(ACatalog:TDiskCatalog):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.GetNextHeaderNo:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetMaxHeaderNo:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetNextHeaderOffset:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetNextHeaderCluster:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetNextCatalogOffset:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.GetNextCatalogCluster:LongWord;
Note | None documented |
---|
function TCDFSFileSystem.SetTable(ATable:TDiskTable):Boolean;
Note | SetTable does not perform any disk writes |
---|
function TCDFSFileSystem.SetBlock(ABlock:TDiskBlock):Boolean;
Note | SetBlock does not perform any disk writes (Blocks are not stored in filesystem) |
---|
function TCDFSFileSystem.SetDescriptor(ADescriptor:TCDFSDiskDescriptor):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetRoot(ADescriptor:TCDFSDiskDescriptor; ARoot:TDiskEntry):Boolean;
Note | Caller must hold the descriptors lock |
---|
function TCDFSFileSystem.SetPath(ATable:TDiskTable; APath:TCDFSDiskPath; ABuffer:Pointer):Boolean;
Note | SetPath does not use BlockWrite as Buffer is passed by caller
Caller must hold the tables lock |
---|
function TCDFSFileSystem.SetEntry(AParent,AEntry:TDiskEntry):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetHeader(AHeader:TCDFSDiskHeader):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetCatalog(ACatalog:TDiskCatalog):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetExtension(AExtension:TCDFSDiskExtension):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetExtended(AEntry:TDiskEntry; AExtended:TCDFSDiskExtended):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SizeEntry(AParent,AEntry:TDiskEntry; const ASize:Int64):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.GetBlock(ABlockNo:LongWord):TDiskBlock;
Note | Overidden to implement multiple entry blocks |
---|
function TCDFSFileSystem.GetBlockEx(ABlockNo:LongWord; AWrite:Boolean):TDiskBlock;
Note | Overidden to implement multiple entry blocks |
---|
function TCDFSFileSystem.GetDescriptor(AType,AInstance:Byte):TCDFSDiskDescriptor;
Note | None documented |
---|
function TCDFSFileSystem.GetDescriptorEx(AType,AInstance:Byte; AWrite:Boolean):TCDFSDiskDescriptor;
Note | None documented |
---|
function TCDFSFileSystem.GetRoot(ADescriptor:TCDFSDiskDescriptor):TDiskEntry;
Note | Caller must hold the descriptors lock |
---|
function TCDFSFileSystem.GetPath(ATable:TDiskTable; AParentNumber:Word; const AName:String):TCDFSDiskPath;
Note | Caller must hold the tables lock |
---|
function TCDFSFileSystem.GetHeader(AHeaderNo:LongWord):TCDFSDiskHeader;
Note | HeaderNo is one based |
---|
function TCDFSFileSystem.GetHeaderEx(AHeaderNo:LongWord; AWrite:Boolean):TCDFSDiskHeader;
Note | HeaderNo is one based |
---|
function TCDFSFileSystem.GetExtension(AExtensionNo:LongWord):TCDFSDiskExtension;
Note | ExtensionNo is one based |
---|
function TCDFSFileSystem.GetExtensionEx(AExtensionNo:LongWord; AWrite:Boolean):TCDFSDiskExtension;
Note | ExtensionNo is one based |
---|
function TCDFSFileSystem.GetExtended(AEntry:TDiskEntry):TCDFSDiskExtended;
Note | None documented |
---|
function TCDFSFileSystem.GetVersion(const AName:String):String;
Note | None documented |
---|
function TCDFSFileSystem.StripDot(const AName:String):String;
Note | None documented |
---|
function TCDFSFileSystem.StripVersion(const AName:String):String;
Note | None documented |
---|
function TCDFSFileSystem.CompareName(const AName,AMatch:String; AWildcard:Boolean):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.CompareSequence(const ASequence; const ACompare; ASize:Integer):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.CompareIdentifier(const AIdentifier; const ACompare; ASize:Integer):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.CalculateVolumeSerial(ABuffer:Pointer; ASize:Integer):LongWord;
Note | None documented |
---|
function TCDFSFileSystem.FileSystemInit:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.MountFileSystem:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.DismountFileSystem:Boolean;
Note | None documented |
---|
function TCDFSFileSystem.InitializeFileSystem(ASectorsPerCluster:LongWord; AFileSysType:TFileSysType):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.GetDriveLabel:String;
Note | None documented |
---|
function TCDFSFileSystem.SetDriveLabel(const ALabel:String):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.SetDriveSerial(ASerial:LongWord):Boolean;
Note | None documented |
---|
function TCDFSFileSystem.GetDriveFreeSpaceEx:Int64;
Note | None documented |
---|
function TCDFSFileSystem.GetDriveTotalSpaceEx:Int64;
Note | None documented |
---|
function TCDFSFileSystem.GetDriveInformation(var AClusterSize:LongWord; var ATotalClusterCount,AFreeClusterCount:Int64):Boolean;
Note | None documented |
---|
Return to Unit Reference