TFileSystem

From Ultibo.org
Jump to: navigation, search

Return to Unit Filesystem


Description


To be documented

Class definitions



TFileSystem = class(TListObject)

constructor Create(ADriver:TFileSysDriver; AVolume:TDiskVolume; ADrive:TDiskDrive);  
destructor Destroy; override;  
private
FLock:TSynchronizerHandle;  
FLocalLock:TMutexHandle;  
protected
FDriver:TFileSysDriver;  
FVolume:TDiskVolume;  
FDrive:TDiskDrive;  
 
FPathChar:String; Path separator character
FNameChar:String; Name separator character
FFileChar:String; File separator character
FRootChar:String; Root specifier character (eg C:)
FRootName:String;  
FRootPath:String; Root Path must be prefixed with \\.
FMaxFile:Integer;  
FMaxPath:Integer;  
FMaxAltFile:Integer;  
FMaxAltPath:Integer;  
FAttributes:LongWord;  
FMaxAttributes:LongWord;  
FMaskAttributes:LongWord;  
FMountPointTag:LongWord;  
FSymbolicLinkTag:LongWord;  
FMinFileTime:TFileTime;  
FSystemName:String;  
FVolumeName:String;  
FVolumeGUID:String;  
FVolumeSerial:LongWord;  
FFileSysType:TFileSysType;  
 
FSectorSize:Word;  
FStartSector:Int64;  
FSectorCount:LongWord;  
 
FRoot:TDiskEntry;  
 
FCurrentIndex:LongWord; TLS Index for storing current directory
FCurrentEntry:TDiskEntry; Current directory when global current directory is enabled
 
FChunks:TFileSysList;  
FTables:TFileSysList;  
FBlocks:TFileSysList;  
FEntries:TFileSysTree;  
FCatalogs:TFileSysList;  
FAcls:TFileSysList;  
 
FChunkLocal:TMutexHandle; Local Lock shared by all DiskChunk objects
FTableLocal:TMutexHandle; Local Lock shared by all DiskTable objects
FBlockLocal:TMutexHandle; Local Lock shared by all DiskBlock objects
FEntryLocal:TMutexHandle; Local Lock shared by all DiskEntry objects
FCatalogLocal:TMutexHandle; Local Lock shared by all DiskCatalog objects
FSecurityLocal:TMutexHandle; Local Lock shared by all DiskSecurity objects
FAclLocal:TMutexHandle; Local Lock shared by all DiskAcl objects
FAceLocal:TMutexHandle; Local Lock shared by all DiskAce objects
 
FMarkDirty:Boolean; Mark the volume as dirty when dismounting (Either by request or due to error)
FMarkClean:Boolean; Mark the volume as clean when dismounting (Only by request)
FMarkError:Boolean; Error was encounted on volume, mark as dirty when dismounting
FLogDirty:Boolean; LogFile was dirty when mounted (if supported by filesystem)
FMountDirty:Boolean; Volume was dirty when mounted, leave marked as dirty when dismounting
 
FOemConvert:Boolean; Default to True overidden by descendants if not supported
FNumericTail:Boolean; Default to True overidden by descendants if not supported
 
FReadOnly:Boolean; Default to False overidden by descendants if True
FLongNames:Boolean; Default to True overidden by descendants if not supported
FDataStreams:Boolean; Default to False overidden by descendants if supported
FReparsePoints:Boolean; Default to False overidden by descendants if supported
FCaseSensitive:Boolean; Default to False overidden by descendants if supported
FCasePreserved:Boolean; Default to False overidden by descendants if supported
FUnicodeNames:Boolean; Default to False overidden by descendants if supported
FPersistentAcls:Boolean; Default to False overidden by descendants if supported
FFileCompression:Boolean; Default to False overidden by descendants if supported
FVolumeQuotas:Boolean; Default to False overidden by descendants if supported
FSparseFiles:Boolean; Default to False overidden by descendants if supported
FRemoteStorage:Boolean; Default to False overidden by descendants if supported
FVolumeCompressed:Boolean; Default to False overidden by descendants if supported
FObjectIds:Boolean; Default to False overidden by descendants if supported
FEncryption:Boolean; Default to False overidden by descendants if supported
 
FBootCatalog:Boolean; Default to False overidden by descendants if supported
FVirtualVolume:Boolean; Default to False overidden by descendants if supported
FFolderEncryption:Boolean; Default to False overidden by descendants if supported
FFolderCompression:Boolean; Default to False overidden by descendants if supported
 
FBootSector:LongWord; Relative to StartSector
FBootBackup:LongWord; Relative to StartSector
 
FSectorBuffer:Pointer; Buffer of exactly sector size
FSectorLock:TMutexHandle; Lock for sector buffer
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function SectorLock:Boolean;  
function SectorUnlock:Boolean;  
 
procedure SetDrive(ADrive:TDiskDrive); virtual;  
procedure SetVolume(AVolume:TDiskVolume); virtual;  
 
function GetPathChar:String; virtual;  
function GetNameChar:String; virtual;  
function GetFileChar:String; virtual;  
function GetRootChar:String; virtual;  
function GetRootName:String; virtual;  
function GetRootPath:String; virtual;  
function GetSystemName:String; virtual;  
function GetVolumeName:String; virtual;  
function GetVolumeGUID:String; virtual;  
 
function LoadPathChar:String; virtual;  
function LoadNameChar:String; virtual;  
function LoadFileChar:String; virtual;  
function LoadRootChar:String; virtual;  
function LoadRootName:String; virtual;  
function LoadRootPath:String; virtual;  
function LoadMaxFile:Integer; virtual;  
function LoadMaxPath:Integer; virtual;  
function LoadMaxAltFile:Integer; virtual;  
function LoadMaxAltPath:Integer; virtual;  
function LoadAttributes:LongWord; virtual; Get the Volume Attributes
function LoadMaxAttributes:LongWord; virtual; Get the Maximum File Attributes (used when setting file attributes)
function LoadMaskAttributes:LongWord; virtual; Get the File Attributes Mask (used when getting file attributes)
function LoadMountPointTag:LongWord; virtual;  
function LoadSymbolicLinkTag:LongWord; virtual;  
function LoadMinFileTime:TFileTime; virtual;  
function LoadSystemName:String; virtual;  
function LoadVolumeName:String; virtual;  
function LoadVolumeGUID:String; virtual;  
function LoadVolumeSerial:LongWord; virtual;  
function LoadFileSysType:TFileSysType; virtual;  
 
function LoadSectorSize:Word; virtual;  
function LoadStartSector:Int64; virtual;  
function LoadSectorCount:LongWord; virtual;  
 
function GetCurrent:TDiskEntry; virtual;  
function SetCurrent(ACurrent:TDiskEntry):Boolean; virtual;  
 
function FillSectors(ASector,ACount:LongWord; AValue:Byte):Boolean;  
 
function ReadSectors(ASector,ACount:LongWord; var ABuffer):Boolean;  
function WriteSectors(ASector,ACount:LongWord; const ABuffer):Boolean;  
 
function ReadEntry(AParent,AEntry:TDiskEntry; var ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer; virtual;  
function WriteEntry(AParent,AEntry:TDiskEntry; const ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer; virtual;  
 
function LoadTables:Boolean; virtual;  
function LoadBlocks:Boolean; virtual;  
function LoadEntries(AParent:TDiskEntry):Boolean; virtual;  
function LoadCatalogs:Boolean; virtual;  
 
function LoadTable(ATableNo:LongWord):Boolean; virtual;  
function LoadBlock(ABlockNo:LongWord):Boolean; virtual;  
Note: LoadEntry can be implemented if needed but is not defined here.
Note: LoadCatalog can be implemented if needed but is not defined here.
 
function UnloadEntries(AParent:TDiskEntry):Boolean; virtual;  
 
function AddEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry; virtual;  
function AddEntryEx(AParent:TDiskEntry; const AName,AAltName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry; virtual;  
function RemoveEntry(AParent,AEntry:TDiskEntry):Boolean; virtual;  
function RenameEntry(AParent,AEntry:TDiskEntry; const AName:String):Boolean; virtual;  
function RenameEntryEx(AParent,AEntry:TDiskEntry; const AAltName:String):Boolean; virtual;  
function MoveEntry(ASource,ADest,AEntry:TDiskEntry):Boolean; virtual;  
 
function AddCatalog(AEntry:TDiskEntry; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):TDiskCatalog; virtual;  
function RemoveCatalog(ACatalog:TDiskCatalog):Boolean; virtual;  
function CheckCatalog(ACatalog:TDiskCatalog; ALock:Boolean; AState:LongWord):Boolean; virtual;  
 
function GetCatalogByNo(ACatalogNo:LongWord; ALock:Boolean; AState:LongWord):TDiskCatalog; virtual;  
function GetCatalogByName(const AName:String; ALock:Boolean; AState:LongWord):TDiskCatalog; virtual;  
function GetCatalogByNext(APrevious:TDiskCatalog; ALock,AUnlock:Boolean; AState:LongWord):TDiskCatalog; virtual;  
 
function GetNextCatalogNo:LongWord; virtual;  
function GetMaxCatalogNo:LongWord; virtual;  
 
function AddHardlink(AEntry,AParent:TDiskEntry; const AName:String; AReference:Boolean):TDiskEntry; virtual;  
function RemoveHardlink(AParent,AEntry:TDiskEntry):Boolean; virtual;  
 
function AddMountPoint(AEntry:TDiskEntry; const ATarget:String):Boolean; virtual;  
function RemoveMountPoint(AEntry:TDiskEntry):Boolean; virtual;  
 
function AddJunctionPoint(AEntry:TDiskEntry; const ATarget:String):Boolean; virtual;  
function RemoveJunctionPoint(AEntry:TDiskEntry):Boolean; virtual;  
 
function AddSymbolicLink(AParent:TDiskEntry; const AName,ATarget:String; AFolder,AReference:Boolean):TDiskEntry; virtual;  
function AddSymbolicLinkEx(AParent:TDiskEntry; const AName,AAltName,ATarget:String; AFolder,AReference:Boolean):TDiskEntry; virtual;  
function RemoveSymbolicLink(AParent,AEntry:TDiskEntry):Boolean; virtual;  
 
function SetTable(ATable:TDiskTable):Boolean; virtual;  
function SetBlock(ABlock:TDiskBlock):Boolean; virtual;  
function SetEntry(AParent,AEntry:TDiskEntry):Boolean; virtual;  
function SetCatalog(ACatalog:TDiskCatalog):Boolean; virtual;  
function SetReparse(AParent,AEntry:TDiskEntry; AReparse:TDiskReparse):Boolean; virtual;  
function SetSecurity(AParent,AEntry:TDiskEntry; ASecurity:TDiskSecurity):Boolean; virtual;  
 
function SizeEntry(AParent,AEntry:TDiskEntry; const ASize:Int64):Boolean; virtual;  
 
function GetTable(ATableNo:LongWord):TDiskTable; virtual;  
function GetTableEx(ATableNo:LongWord; AWrite:Boolean):TDiskTable; virtual;  
function GetBlock(ABlockNo:LongWord):TDiskBlock; virtual;  
function GetBlockEx(ABlockNo:LongWord; AWrite:Boolean):TDiskBlock; virtual;  
function GetEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord):TDiskEntry; virtual;  
function GetEntryEx(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AAdd,ARemove,AWrite:Boolean):TDiskEntry; virtual;  
function GetCatalog(ACatalogNo:LongWord):TDiskCatalog; virtual;  
function GetCatalogEx(ACatalogNo:LongWord; AWrite:Boolean):TDiskCatalog; virtual;  
function GetReparse(AEntry:TDiskEntry):TDiskReparse; virtual;  
function GetSecurity(AEntry:TDiskEntry):TDiskSecurity; virtual;  
 
function MatchEntry(AParent,APrevious:TDiskEntry; const AName:String; AAttributes:LongWord; AAny:Boolean):TDiskEntry; virtual;  
function MatchEntryEx(AParent,APrevious:TDiskEntry; const AName:String; AAttributes:LongWord; AAny,AAdd,ARemove,AWrite:Boolean):TDiskEntry; virtual;  
 
function GetEntryPath(AEntry:TDiskEntry; AAltName:Boolean):String;  
function GetEntryName(AEntry:TDiskEntry; AAltName:Boolean):String;  
 
function SplitPath(const APath:String; var ARelative:Boolean; AFolders:TStrings; var AName:String):Boolean; virtual;  
function SplitName(const AName:String; var AFile,AStream:String):Boolean; virtual;  
function SplitFile(const AFile:String; var AName,AExt:String):Boolean; virtual;  
function SplitStream(const AStream:String; var AName,AType:String):Boolean; virtual;  
 
function BuildPath(ARelative:Boolean; AFolders:TLinkedStringList; const AName:String):String; virtual;  
function BuildName(const AFile,AStream:String):String; virtual;  
function BuildFile(const AName,AExt:String):String; virtual;  
function BuildStream(const AName,AType:String):String; virtual;  
 
function CheckName(const AName:String):Boolean; virtual;  
function CompareName(const AName,AMatch:String; AWildcard:Boolean):Boolean; virtual;  
 
function CheckAltName(const AAltName:String):Boolean; virtual;  
function CompareAltName(const AAltName,AMatch:String; AWildcard:Boolean):Boolean; virtual;  
 
function CheckLinkName(const AName:String):Boolean; virtual;  
 
function GetSecurityFromDescriptor(ADescriptor:Pointer):TDiskSecurity; virtual;  
function GetDescriptorFromSecurity(ASecurity:TDiskSecurity; ADescriptor:Pointer; var ASize:LongWord):Boolean; virtual;  
public
property Volume:TDiskVolume read FVolume write SetVolume;  
property Drive:TDiskDrive read FDrive write SetDrive;  
 
property PathChar:String read GetPathChar;  
property NameChar:String read GetNameChar;  
property FileChar:String read GetFileChar;  
property RootChar:String read GetRootChar;  
property RootName:String read GetRootName;  
property RootPath:String read GetRootPath;  
property MaxFile:Integer read FMaxFile;  
property MaxPath:Integer read FMaxPath;  
property MaxAltFile:Integer read FMaxAltFile;  
property MaxAltPath:Integer read FMaxAltPath;  
property Attributes:LongWord read FAttributes;  
property MaxAttributes:LongWord read FMaxAttributes;  
property MaskAttributes:LongWord read FMaskAttributes;  
property MountPointTag:LongWord read FMountPointTag;  
property SymbolicLinkTag:LongWord read FSymbolicLinkTag;  
property MinFileTime:TFileTime read FMinFileTime;  
property SystemName:String read GetSystemName;  
property VolumeName:String read GetVolumeName;  
property VolumeGUID:String read GetVolumeGUID;  
property VolumeSerial:LongWord read FVolumeSerial;  
property FileSysType:TFileSysType read FFileSysType;  
 
property SectorSize:Word read FSectorSize;  
property StartSector:Int64 read FStartSector;  
property SectorCount:LongWord read FSectorCount;  
 
property MarkDirty:Boolean read FMarkDirty write FMarkDirty;  
property MarkClean:Boolean read FMarkClean write FMarkClean;  
property MarkError:Boolean read FMarkError;  
property LogDirty:Boolean read FLogDirty;  
property MountDirty:Boolean read FMountDirty;  
 
function ReaderLock:Boolean;  
function ReaderUnlock:Boolean;  
function ReaderConvert:Boolean;  
function WriterLock:Boolean;  
function WriterUnlock:Boolean;  
function WriterConvert:Boolean;  
 
function FileSystemInit:Boolean; virtual;  
 
function MountFileSystem:Boolean; virtual;  
function DismountFileSystem:Boolean; virtual;  
function InitializeFileSystem(ASectorsPerCluster:LongWord; AFileSysType:TFileSysType):Boolean; virtual;  
 
function CreateCatalog(const AName:String; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):LongWord; virtual;  
function DeleteCatalog(ACatalogNo:LongWord):Boolean; virtual;  
 
function FindFirstCatalog(var ASearchRec:TCatalogSearchRec):Integer; virtual;  
function FindNextCatalog(var ASearchRec:TCatalogSearchRec):Integer; virtual;  
procedure FindCatalogClose(var ASearchRec:TCatalogSearchRec); virtual;  
 
function GetDriveLabel:String; virtual;  
function SetDriveLabel(const ALabel:String):Boolean; virtual;  
function GetDriveSerial:LongWord; virtual;  
function SetDriveSerial(ASerial:LongWord):Boolean; virtual;  
 
function GetDriveFreeSpace:LongWord; virtual;  
function GetDriveFreeSpaceEx:Int64; virtual;  
function GetDriveTotalSpace:LongWord; virtual;  
function GetDriveTotalSpaceEx:Int64; virtual;  
 
function GetDriveInformation(var AClusterSize:LongWord; var ATotalClusterCount,AFreeClusterCount:Int64):Boolean; virtual;  
 
function FileOpen(const FileName:String; Mode:Integer):THandle; virtual;  
function FileCreate(const FileName:String; Mode:Integer = fmOpenReadWrite or fmShareExclusive):THandle; virtual;  
function DeleteFile(const FileName:String):Boolean; virtual;  
procedure FileClose(Handle:Integer); virtual;  
function RenameFile(const OldName,NewName:String):Boolean; virtual;  
function FileSeek(Handle:THandle; Offset,Origin:LongInt):LongInt; virtual;  
function FileSeekEx(Handle:THandle; const Offset:Int64; Origin:LongInt):Int64; virtual;  
function FileFlush(Handle:Integer):Boolean; virtual;  
function FileTruncate(Handle:Integer):Boolean; virtual;  
 
function FilePos(Handle:THandle):LongInt; virtual;  
function FilePosEx(Handle:THandle):Int64; virtual;  
 
function FileGetAttr(const FileName:String):Integer; virtual;  
function FileGetDate(Handle:Integer):Integer; virtual;  
function FileGetSize(Handle:THandle):LongInt; virtual;  
function FileGetSizeEx(Handle:THandle):Int64; virtual;  
function FileSetAttr(const FileName:String; Attr:Integer):Integer; virtual;  
function FileSetDate(Handle:Integer; Age:Integer):Integer; virtual;  
function FileSetSize(Handle:THandle; Size:LongInt):LongInt; virtual;  
function FileSetSizeEx(Handle:THandle; const Size:Int64):LongInt; virtual;  
 
function FileRead(Handle:THandle; var Buffer; Count:LongInt):LongInt; virtual;  
function FileWrite(Handle:THandle; const Buffer; Count:LongInt):LongInt; virtual;  
 
function CreateDir(const DirName:String):Boolean; virtual;  
function RemoveDir(const DirName:String):Boolean; virtual;  
function GetCurrentDir:String; virtual;  
function SetCurrentDir(const DirName:String):Boolean; virtual;  
 
function FindOne(const Path:String; var SearchRec:TFileSearchRec):Integer; virtual;  
function FindAll(const Path:String; var SearchRec:TFileSearchRec):Integer; virtual;  
 
function FindFirstEx(const Path:String; var SearchRec:TFileSearchRec):Integer; virtual;  
function FindNextEx(var SearchRec:TFileSearchRec):Integer; virtual;  
procedure FindCloseEx(var SearchRec:TFileSearchRec); virtual;  
 
function FindFirstStream(const FileName:String; var SearchRec:TStreamSearchRec):Integer; virtual;  
function FindNextStream(var SearchRec:TStreamSearchRec):Integer; virtual;  
procedure FindStreamClose(var SearchRec:TStreamSearchRec); virtual;  
 
function FindFirstFileName(const FileName:String; var SearchRec:TLinkSearchRec):Integer; virtual;  
function FindNextFileName(var SearchRec:TLinkSearchRec):Integer; virtual;  
procedure FindFileNameClose(var SearchRec:TLinkSearchRec); virtual;  
 
function CreateHardLink(const LinkName,FileName:String):Boolean; virtual;  
function DeleteHardLink(const LinkName:String):Boolean; virtual;  
 
function CreateMountPoint(const PathName,VolumeName:String):Boolean; virtual;  
function DeleteMountPoint(const PathName:String):Boolean; virtual;  
 
function CreateJunctionPoint(const PathName,FolderName:String):Boolean; virtual;  
function DeleteJunctionPoint(const PathName:String):Boolean; virtual;  
 
function CreateSymbolicLink(const LinkName,TargetName:String; Directory:Boolean):Boolean; virtual;  
function CreateSymbolicLinkEx(const LinkName,ShortName,TargetName:String; Directory:Boolean):Boolean; virtual;  
function DeleteSymbolicLink(const LinkName:String):Boolean; virtual;  
 
function GetMountPointTarget(const PathName:String):String; virtual;  
function GetJunctionPointTarget(const PathName:String):String; virtual;  
function GetSymbolicLinkTarget(const LinkName:String):String; virtual;  
 
function SetFileShortName(const FileName,ShortName:String):Boolean; virtual;  
function SetFileShortNameEx(Handle:Integer; const ShortName:String):Boolean; virtual;  
 
function GetFileSecurity(const FileName:String; Descriptor:Pointer; var Size:LongWord):Boolean; virtual;  
function SetFileSecurity(const FileName:String; Descriptor:Pointer):Boolean; virtual;  
 
function GetPathName(const FileName:String):String; virtual;  
 
function GetShortName(const FileName:String):String; virtual;  
function GetLongName(const FileName:String):String; virtual;  
function GetTrueName(const FileName:String):String; virtual;  
 
function FileCreateEx(const FileName,ShortName:String; Mode:Integer = fmOpenReadWrite or fmShareExclusive):THandle; virtual;  
function CreateDirEx(const DirName,ShortName:String):Boolean; virtual;  
 
function FileGetAttrEx(Handle:Integer):Integer; virtual;  
 
function FileGetDateEx(Handle:Integer):TFileTime; virtual;  
function FileSetDateEx(Handle:Integer; Age:TFileTime):Integer; virtual;  
function GetFileTime(Handle:Integer; CreateTime,AccessTime,ModifyTime:PFileTime):Boolean; virtual;  
function SetFileTime(Handle:Integer; CreateTime,AccessTime,ModifyTime:PFileTime):Boolean; virtual;  
 
function CloseFile(Handle:THandle):Boolean; virtual; Equivalent to Win32 CloseHandle


Function declarations



constructor TFileSystem.Create(ADriver:TFileSysDriver; AVolume:TDiskVolume; ADrive:TDiskDrive);
Description: To be documented
Note None documented


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


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


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


function TFileSystem.SectorLock:Boolean;
Description: To be documented
Note None documented


function TFileSystem.SectorUnlock:Boolean;
Description: To be documented
Note None documented


procedure TFileSystem.SetDrive(ADrive:TDiskDrive);
Description: To be documented
Note None documented


procedure TFileSystem.SetVolume(AVolume:TDiskVolume);
Description: To be documented
Note None documented


function TFileSystem.GetPathChar:String;
Description: To be documented
Note None documented


function TFileSystem.GetNameChar:String;
Description: To be documented
Note None documented


function TFileSystem.GetFileChar:String;
Description: To be documented
Note None documented


function TFileSystem.GetRootChar:String;
Description: To be documented
Note None documented


function TFileSystem.GetRootName:String;
Description: To be documented
Note None documented


function TFileSystem.GetRootPath:String;
Description: To be documented
Note None documented


function TFileSystem.GetSystemName:String;
Description: To be documented
Note None documented


function TFileSystem.GetVolumeName:String;
Description: To be documented
Note None documented


function TFileSystem.GetVolumeGUID:String;
Description: To be documented
Note None documented


function TFileSystem.LoadPathChar:String;
Description: Load the Path separator character
Note None documented


function TFileSystem.LoadNameChar:String;
Description: Load the Name separator character
Note None documented


function TFileSystem.LoadFileChar:String;
Description: Load the File separator character
Note None documented


function TFileSystem.LoadRootChar:String;
Description: Load the Root specifier character (eg C:)
Note None documented


function TFileSystem.LoadRootName:String;
Description: Load Root Name from Drive or Volume (eg C:\ or \\?\Volume1)
Note None documented


function TFileSystem.LoadRootPath:String;
Description: Load Root Path from Volume or Drive (eg \\.\Harddisk0\Partition1 or C:\)
Note None documented


function TFileSystem.LoadMaxFile:Integer;
Description: Load the maximum File name length
Note None documented


function TFileSystem.LoadMaxPath:Integer;
Description: Load the maximum Path name length
Note None documented


function TFileSystem.LoadMaxAltFile:Integer;
Description: Load the maximum Alt File name length
Note None documented


function TFileSystem.LoadMaxAltPath:Integer;
Description: Load the maximum Alt Path name length
Note None documented


function TFileSystem.LoadAttributes:LongWord;
Description: Load the File System (Volume) Attributes
Note None documented


function TFileSystem.LoadMaxAttributes:LongWord;
Description: Load the Maximum File Attributes (FileSetAttr)
Note None documented


function TFileSystem.LoadMaskAttributes:LongWord;
Description: Load the File Attributes Mask (FileGetAttr/FindFirstEx/FindNextEx)
Note None documented


function TFileSystem.LoadMountPointTag:LongWord;
Description: To be documented
Note None documented


function TFileSystem.LoadSymbolicLinkTag:LongWord;
Description: To be documented
Note None documented


function TFileSystem.LoadMinFileTime:TFileTime;
Description: Load the Minimum File Time value (WriteTime/CreateTime/AccessTime)
Note None documented


function TFileSystem.LoadSystemName:String;
Description: To be documented
Note None documented


function TFileSystem.LoadVolumeName:String;
Description: To be documented
Note None documented


function TFileSystem.LoadVolumeGUID:String;
Description: To be documented
Note None documented


function TFileSystem.LoadVolumeSerial:LongWord;
Description: To be documented
Note None documented


function TFileSystem.LoadFileSysType:TFileSysType;
Description: To be documented
Note None documented


function TFileSystem.LoadSectorSize:Word;
Description: Load Sector Size from Volume
Note None documented


function TFileSystem.LoadStartSector:Int64;
Description: Load Start Sector from Volume
Note None documented


function TFileSystem.LoadSectorCount:LongWord;
Description: Load Sector Count from Volume
Note None documented


function TFileSystem.GetCurrent:TDiskEntry;
Description: To be documented
Note None documented


function TFileSystem.SetCurrent(ACurrent:TDiskEntry):Boolean;
Description: To be documented
Note None documented


function TFileSystem.FillSectors(ASector,ACount:LongWord; AValue:Byte):Boolean;
Description: Fill specified number of sectors with the supplied value
Note Sector is relative to the StartSector of the FileSystem


function TFileSystem.ReadSectors(ASector,ACount:LongWord; var ABuffer):Boolean;
Description: Read Sectors from the Volume using Cache
Note Sector is relative to the StartSector of the FileSystem

Caller must hold the filesystem lock, cache will serialize access to device.


function TFileSystem.WriteSectors(ASector,ACount:LongWord; const ABuffer):Boolean;
Description: Write Sectors to the Volume using Cache
Note Sector is relative to the StartSector of the FileSystem

Caller must hold the filesystem lock, cache will serialize access to device.


function TFileSystem.ReadEntry(AParent,AEntry:TDiskEntry; var ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer;
Description: To be documented
Note Start, Count and Size have already been checked.

Offset and Value are private to the filesystem


function TFileSystem.WriteEntry(AParent,AEntry:TDiskEntry; const ABuffer; const AStart:Int64; ACount:LongWord; var AOffset,AValue:LongWord):Integer;
Description: To be documented
Note Start, Count and Size have already been checked.

Offset and Value are private to the filesystem


function TFileSystem.LoadTables:Boolean;
Description: Load all Disk Tables
Note Descendant method must use WriterLock on Tables


function TFileSystem.LoadBlocks:Boolean;
Description: Load all Disk Blocks
Note Descendant method must use WriterLock on Blocks


function TFileSystem.LoadEntries(AParent:TDiskEntry):Boolean;
Description: To be documented
Note Parent must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.LoadCatalogs:Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Catalogs


function TFileSystem.LoadTable(ATableNo:LongWord):Boolean;
Description: To be documented
Note TableNo is zero based

Descendant method must use WriterLock on Tables


function TFileSystem.LoadBlock(ABlockNo:LongWord):Boolean;
Description: To be documented
Note BlockNo is zero based

Descendant method must use WriterLock on Blocks


function TFileSystem.UnloadEntries(AParent:TDiskEntry):Boolean;
Description: To be documented
Note Parent must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.AddEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry;
Description: To be documented
Reference Add a reference on the returned entry if True
Note Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.AddEntryEx(AParent:TDiskEntry; const AName,AAltName:String; AAttributes:LongWord; AReference:Boolean):TDiskEntry;
Description: To be documented
AltName If AltName already exists then a generated one will be provided, will not fail due to AltName.
Reference Add a reference on the returned entry if True
Note Parent must be supplied, Name and AltName have already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.RemoveEntry(AParent,AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Files and Folders have been checked, Handles have been checked.

Parent must be supplied
Descendant method must use WriterLock on Entries


function TFileSystem.RenameEntry(AParent,AEntry:TDiskEntry; const AName:String):Boolean;
Description: To be documented
Note Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.RenameEntryEx(AParent,AEntry:TDiskEntry; const AAltName:String):Boolean;
Description: To be documented
Note Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.MoveEntry(ASource,ADest,AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Source and Dest must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.AddCatalog(AEntry:TDiskEntry; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):TDiskCatalog;
Description: To be documented
Note Descendant method must use WriterLock on Catalogs


function TFileSystem.RemoveCatalog(ACatalog:TDiskCatalog):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Catalogs


function TFileSystem.CheckCatalog(ACatalog:TDiskCatalog; ALock:Boolean; AState:LongWord):Boolean;
Description: To be documented
Note None documented


function TFileSystem.GetCatalogByNo(ACatalogNo:LongWord; ALock:Boolean; AState:LongWord):TDiskCatalog;
Description: To be documented
Note CatalogNo is one based


function TFileSystem.GetCatalogByName(const AName:String; ALock:Boolean; AState:LongWord):TDiskCatalog;
Description: To be documented
Note None documented


function TFileSystem.GetCatalogByNext(APrevious:TDiskCatalog; ALock,AUnlock:Boolean; AState:LongWord):TDiskCatalog;
Description: To be documented
Note None documented


function TFileSystem.GetNextCatalogNo:LongWord;
Description: To be documented
Note None documented


function TFileSystem.GetMaxCatalogNo:LongWord;
Description: To be documented
Note None documented


function TFileSystem.AddHardlink(AEntry,AParent:TDiskEntry; const AName:String; AReference:Boolean):TDiskEntry;
Description: To be documented
Reference Add a reference on the returned entry if True
Note Entry and Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.RemoveHardlink(AParent,AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Entry and Parent must be supplied, Entry will be deleted.

Descendant method must use WriterLock on Entries


function TFileSystem.AddMountPoint(AEntry:TDiskEntry; const ATarget:String):Boolean;
Description: To be documented
Note Entry must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.RemoveMountPoint(AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Entry must be supplied, Entry will not be deleted.

Descendant method must use WriterLock on Entries


function TFileSystem.AddJunctionPoint(AEntry:TDiskEntry; const ATarget:String):Boolean;
Description: To be documented
Note Entry must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.RemoveJunctionPoint(AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Entry must be supplied, Entry will not be deleted.

Descendant method must use WriterLock on Entries


function TFileSystem.AddSymbolicLink(AParent:TDiskEntry; const AName,ATarget:String; AFolder,AReference:Boolean):TDiskEntry;
Description: To be documented
Reference Add a reference on the returned entry if True
Note Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.AddSymbolicLinkEx(AParent:TDiskEntry; const AName,AAltName,ATarget:String; AFolder,AReference:Boolean):TDiskEntry;
Description: To be documented
Reference Add a reference on the returned entry if True
Note Parent must be supplied, Name has already been checked.

Descendant method must use WriterLock on Entries


function TFileSystem.RemoveSymbolicLink(AParent,AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Entry and Parent must be supplied, Entry will be deleted.

Descendant method must use WriterLock on Entries


function TFileSystem.SetTable(ATable:TDiskTable):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Tables


function TFileSystem.SetBlock(ABlock:TDiskBlock):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Blocks


function TFileSystem.SetEntry(AParent,AEntry:TDiskEntry):Boolean;
Description: To be documented
Note Parent must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.SetCatalog(ACatalog:TDiskCatalog):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Catalogs


function TFileSystem.SetReparse(AParent,AEntry:TDiskEntry; AReparse:TDiskReparse):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Entries


function TFileSystem.SetSecurity(AParent,AEntry:TDiskEntry; ASecurity:TDiskSecurity):Boolean;
Description: To be documented
Note Descendant method must use WriterLock on Entries


function TFileSystem.SizeEntry(AParent,AEntry:TDiskEntry; const ASize:Int64):Boolean;
Description: To be documented
Note Parent must be supplied

Descendant method must use WriterLock on Entries


function TFileSystem.GetTable(ATableNo:LongWord):TDiskTable;
Description: To be documented
Note TableNo is zero based

Descendants may override if required


function TFileSystem.GetTableEx(ATableNo:LongWord; AWrite:Boolean):TDiskTable;
Description: To be documented
Write Use the writer lock on the blocks instead of the reader lock if True
Note TableNo is zero based

Descendants may override if required


function TFileSystem.GetBlock(ABlockNo:LongWord):TDiskBlock;
Description: To be documented
Note BlockNo is zero based

Descendants may override if required


function TFileSystem.GetBlockEx(ABlockNo:LongWord; AWrite:Boolean):TDiskBlock;
Description: To be documented
Write Use the writer lock on the blocks instead of the reader lock if True
Note BlockNo is zero based

Descendants may override if required


function TFileSystem.GetEntry(AParent:TDiskEntry; const AName:String; AAttributes:LongWord):TDiskEntry;
Description: To be documented
Attributes Attributes is the match attributes to be checked
Note If Parent is not supplied Root is assumed


function TFileSystem.GetEntryEx(AParent:TDiskEntry; const AName:String; AAttributes:LongWord; AAdd,ARemove,AWrite:Boolean):TDiskEntry; 
Description: To be documented
Attributes Attributes is the match attributes to be checked
Add Add a reference on the returned entry if True
Remove Remove a reference from the parent entry if True (If supplied)
Write Use the writer lock on the entries instead of the reader lock if True
Note If Parent is not supplied Root is assumed


function TFileSystem.GetCatalog(ACatalogNo:LongWord):TDiskCatalog;
Description: To be documented
Note CatalogNo is one based


function TFileSystem.GetCatalogEx(ACatalogNo:LongWord; AWrite:Boolean):TDiskCatalog;
Description: To be documented
Note CatalogNo is one based


function TFileSystem.GetReparse(AEntry:TDiskEntry):TDiskReparse;
Description: To be documented
Note None documented


function TFileSystem.GetSecurity(AEntry:TDiskEntry):TDiskSecurity;
Description: To be documented
Note None documented


function TFileSystem.MatchEntry(AParent,APrevious:TDiskEntry; const AName:String; AAttributes:LongWord; AAny:Boolean):TDiskEntry;
Description: To be documented
Attributes Attributes is the match attributes to be checked
Note If Parent is not supplied Root is assumed


function TFileSystem.MatchEntryEx(AParent,APrevious:TDiskEntry; const AName:String; AAttributes:LongWord; AAny,AAdd,ARemove,AWrite:Boolean):TDiskEntry;
Description: To be documented
Attributes Attributes is the match attributes to be checked
Add Add a reference on the returned entry if True
Remove Remove a reference from the previous entry if True (If supplied)
Write Use the writer lock on the entries instead of the reader lock if True
Note If Parent is not supplied Root is assumed


function TFileSystem.GetEntryPath(AEntry:TDiskEntry; AAltName:Boolean):String;
Description: Get the Full Path of an Entry (Not including Entry itself)
Note Path ends with a trailing slash of PathChar unless Entry is a stream


function TFileSystem.GetEntryName(AEntry:TDiskEntry; AAltName:Boolean):String;
Description: Get the Full Name of an Entry (Including Entry itself)
Note None documented


function TFileSystem.SplitPath(const APath:String; var ARelative:Boolean; AFolders:TStrings; var AName:String):Boolean;
Description: Split a Path into the component parts
Relative Relative returns True if path is relative to current folder


function TFileSystem.SplitName(const AName:String; var AFile,AStream:String):Boolean;
Description: Split a Name into the component parts (File and Stream)
Name Name must not contain drive or path components
Return Returns False if name does not contain a stream component


function TFileSystem.SplitFile(const AFile:String; var AName,AExt:String):Boolean;
Description: Split a File into the component parts (Name and Ext)
File File must not contain drive or path components


function TFileSystem.SplitStream(const AStream:String; var AName,AType:String):Boolean;
Description: Split a Stream into the component parts (Name and Type)
Stream Stream must not contain drive, path or file components.


function TFileSystem.BuildPath(ARelative:Boolean; AFolders:TLinkedStringList; const AName:String):String;
Description: Build Path from the component parts
Relative If Relative is True then path is relative to current folder


function TFileSystem.BuildName(const AFile,AStream:String):String;
Description: Build a Name from the component parts (File and Stream)
Note None documented


function TFileSystem.BuildFile(const AName,AExt:String):String;
Description: Build a File from the component parts (Name and Ext)
Note None documented


function TFileSystem.BuildStream(const AName,AType:String):String;
Description: Build a Stream from the component parts (Name and Type)
Note None documented


function TFileSystem.CheckName(const AName:String):Boolean;
Description: Performs Name validation based on File System rules
Note None documented


function TFileSystem.CompareName(const AName,AMatch:String; AWildcard:Boolean):Boolean;
Description: Perform Name matching based on File System rules for Case-sensitivity etc
Note Also provides Wildcard matching based on File System rules


function TFileSystem.CheckAltName(const AAltName:String):Boolean;
Description: Performs Name validation based on File System rules
Note None documented


function TFileSystem.CompareAltName(const AAltName,AMatch:String; AWildcard:Boolean):Boolean;
Description: To be documented
Note None documented


function TFileSystem.CheckLinkName(const AName:String):Boolean;
Description: To be documented
Note None documented


function TFileSystem.GetSecurityFromDescriptor(ADescriptor:Pointer):TDiskSecurity;
Description: To be documented
Note None documented


function TFileSystem.GetDescriptorFromSecurity(ASecurity:TDiskSecurity; ADescriptor:Pointer; var ASize:LongWord):Boolean;
Description: To be documented
Note None documented


function TFileSystem.ReaderLock:Boolean;
Description: To be documented
Note None documented


function TFileSystem.ReaderUnlock:Boolean;
Description: To be documented
Note None documented


function TFileSystem.ReaderConvert:Boolean;
Description: Convert a Reader lock to a Writer lock
Note None documented


function TFileSystem.WriterLock:Boolean;
Description: To be documented
Note None documented


function TFileSystem.WriterUnlock:Boolean;
Description: To be documented
Note None documented


function TFileSystem.WriterConvert:Boolean;
Description: To be documented
Note None documented


function TFileSystem.FileSystemInit:Boolean;
Description: To be documented
Note None documented


function TFileSystem.MountFileSystem:Boolean;
Description: To be documented
Note None documented

function TFileSystem.DismountFileSystem:Boolean;
Description: To be documented
Note None documented


function TFileSystem.InitializeFileSystem(ASectorsPerCluster:LongWord; AFileSysType:TFileSysType):Boolean;
Description: To be documented
Note None documented


function TFileSystem.CreateCatalog(const AName:String; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):LongWord;
Description: To be documented
Note None documented


function TFileSystem.DeleteCatalog(ACatalogNo:LongWord):Boolean;
Description: To be documented
Note None documented


function TFileSystem.FindFirstCatalog(var ASearchRec:TCatalogSearchRec):Integer;
Description: To be documented
Note None documented


function TFileSystem.FindNextCatalog(var ASearchRec:TCatalogSearchRec):Integer;
Description: To be documented
Note None documented


procedure TFileSystem.FindCatalogClose(var ASearchRec:TCatalogSearchRec);
Description: Close an open find Handle
Note None documented


function TFileSystem.GetDriveLabel:String;
Description: To be documented
Note None documented


function TFileSystem.SetDriveLabel(const ALabel:String):Boolean;
Description: To be documented
Note None documented


function TFileSystem.GetDriveSerial:LongWord;
Description: To be documented
Note None documented


function TFileSystem.SetDriveSerial(ASerial:LongWord):Boolean;
Description: To be documented
Note None documented


function TFileSystem.GetDriveFreeSpace:LongWord;
Description: Return the Free space on Drive up to 2GB
Note None documented


function TFileSystem.GetDriveFreeSpaceEx:Int64;
Description: To be documented
Note None documented


function TFileSystem.GetDriveTotalSpace:LongWord;
Description: Return the Total space on Drive up to 2GB
Note None documented


function TFileSystem.GetDriveTotalSpaceEx:Int64;
Description: Return the Total space on Drive up to 4TB
Note None documented


function TFileSystem.GetDriveInformation(var AClusterSize:LongWord; var ATotalClusterCount,AFreeClusterCount:Int64):Boolean;
Description: To be documented
Note None documented


function TFileSystem.FileOpen(const FileName:String; Mode:Integer):THandle;
Description: Open existing entry and return Handle
Note FileOpen can also open Folders but the handle can only be used for Get/SetFileTime

Cannot create with FileOpen


function TFileSystem.FileCreate(const FileName:String; Mode:Integer = fmOpenReadWrite or fmShareExclusive):THandle;
Description: Create new entry or truncate existing entry and return Handle
Note Cannot create Folders with FileCreate


function TFileSystem.DeleteFile(const FileName:String):Boolean;
Description: Delete existing entry
Note None documented


procedure TFileSystem.FileClose(Handle:Integer);
Description: Close open handle
Note None documented


function TFileSystem.RenameFile(const OldName,NewName:String):Boolean;
Description: Rename existing entry
Note If 8.3 then modify entry if Long then create new entry, delete existing.


function TFileSystem.FileSeek(Handle:THandle; Offset,Origin:LongInt):LongInt;
Description: Move the position of an open handle
Note None documented


function TFileSystem.FileSeekEx(Handle:THandle; const Offset:Int64; Origin:LongInt):Int64;
Description: Move the position of an open handle
Note File Seeks can extend the size if OpenMode is Write or ReadWrite


function TFileSystem.FileFlush(Handle:Integer):Boolean;
Description: Flush an open handle from Cache
Note Currently just flushes the Cache


function TFileSystem.FileTruncate(Handle:Integer):Boolean;
Description: Truncate an open file at the current position
Note Can extend a file as well as truncate


function TFileSystem.FilePos(Handle:THandle):LongInt;
Description: Return the position of an open Handle
Note None documented


function TFileSystem.FilePosEx(Handle:THandle):Int64;
Description: Return the position of an open Handle
Note None documented


function TFileSystem.FileGetAttr(const FileName:String):Integer;
Description: Get the attributes of an existing entry
Note None documented


function TFileSystem.FileGetDate(Handle:Integer):Integer;
Description: Get the date/time of an existing entry with an open Handle
Note Returned time is converted to Local


function TFileSystem.FileGetSize(Handle:THandle):LongInt;
Description: Get the size of an existing entry with an open Handle
Note None documented


function TFileSystem.FileGetSizeEx(Handle:THandle):Int64;
Description: Get the size of an existing entry with an open Handle
Note None documented


function TFileSystem.FileSetAttr(const FileName:String; Attr:Integer):Integer;
Description: Set the attributes of an existing entry
Note File attributes can be set regardless of existing Handles


function TFileSystem.FileSetDate(Handle:Integer; Age:Integer):Integer;
Description: Set the date/time of an existing entry with an open Handle
Note Passed time is assumed to be Local and is converted to UTC


function TFileSystem.FileSetSize(Handle:THandle; Size:LongInt):LongInt;
Description: Set the size of an existing entry with an open Handle
Note None documented


function TFileSystem.FileSetSizeEx(Handle:THandle; const Size:Int64):LongInt;
Description: Set the size of an existing entry with Open handle
Note None documented


function TFileSystem.FileRead(Handle:THandle; var Buffer;Count:LongInt):LongInt;
Description: Read data from an existing entry with an open Handle
Note Position may be beyond the end of the file

A read from beyond the end of the file will return 0 bytes


function TFileSystem.FileWrite(Handle:THandle; const Buffer; Count:LongInt):LongInt;
Description: Write data to an existing entry with an open Handle
Note Position may be beyond the end of the file

A write to beyond the end of the file will succeed and Size will be Position plus Count


function TFileSystem.CreateDir(const DirName:String):Boolean;
Description: Create a new entry
Note No File or Stream support


function TFileSystem.RemoveDir(const DirName:String):Boolean;
Description: Delete an existing entry
Note No File or Stream support


function TFileSystem.GetCurrentDir:String;
Description: Return the current directory
Note No File or Stream support


function TFileSystem.SetCurrentDir(const DirName:String):Boolean;
Description: Set the current directory to an existing entry}{No File or Stream support
Note None documented


function TFileSystem.FindFirstEx(const Path:String; var SearchRec:TFileSearchRec):Integer;
Description: Find existing entries matching the specifications
Note None documented


function TFileSystem.FindNextEx(var SearchRec:TFileSearchRec):Integer;
Description: Continue Finding existing entries matching the specifications
Note None documented


procedure TFileSystem.FindCloseEx(var SearchRec:TFileSearchRec);
Description: Close an open find Handle
Note None documented


function TFileSystem.FindFirstStream(const FileName:String; var SearchRec:TStreamSearchRec):Integer;
Description: Find existing streams matching the specifications
Note This does not return the default data stream for files


function TFileSystem.FindNextStream(var SearchRec:TStreamSearchRec):Integer;
Description: Continue finding existing streams matching the specifications
Note This does not return the default data stream for files


procedure TFileSystem.FindStreamClose(var SearchRec:TStreamSearchRec);
Description: Close an open find Handle
Note None documented


function TFileSystem.FindFirstFileName(const FileName:String; var SearchRec:TLinkSearchRec):Integer;
Description: Find existing file names matching the specifications
Note None documented


function TFileSystem.FindNextFileName(var SearchRec:TLinkSearchRec):Integer;
Description: Continue finding existing file names matching the specifications
Note None documented


procedure TFileSystem.FindFileNameClose(var SearchRec:TLinkSearchRec);
Description: Close an open find Handle
Note None documented


function TFileSystem.CreateHardLink(const LinkName,FileName:String):Boolean;
Description: To be documented
Note Link must not exist, File must exist and must be a file. Both must be on the same volume.


function TFileSystem.DeleteHardLink(const LinkName:String):Boolean;
Description: To be documented
Note Link must exist and must be a file


function TFileSystem.CreateMountPoint(const PathName,VolumeName:String):Boolean;
Description: To be documented
Note Path must exist and must be a folder, Volume value is not checked.


function TFileSystem.DeleteMountPoint(const PathName:String):Boolean;
Description: To be documented
Note Path must exist and must be a folder


function TFileSystem.CreateJunctionPoint(const PathName,FolderName:String):Boolean;
Description: To be documented
Note Path must exist and must be a folder, Folder value is not checked.


function TFileSystem.DeleteJunctionPoint(const PathName:String):Boolean;
Description: To be documented
Note Path must exist and must be a folder


function TFileSystem.CreateSymbolicLink(const LinkName,TargetName:String; Directory:Boolean):Boolean;
Description: To be documented
Note Link must not exist, Target value is not checked.


function TFileSystem.CreateSymbolicLinkEx(const LinkName,ShortName,TargetName:String; Directory:Boolean):Boolean;
Description: To be documented
Note Link must not exist, Target value is not checked.


function TFileSystem.DeleteSymbolicLink(const LinkName:String):Boolean;
Description: To be documented
Note Link must exist


function TFileSystem.GetMountPointTarget(const PathName:String):String;
Description: To be documented
Note None documented


function TFileSystem.GetJunctionPointTarget(const PathName:String):String;
Description: To be documented
Note None documented


function TFileSystem.GetSymbolicLinkTarget(const LinkName:String):String;
Description: To be documented
Note None documented


function TFileSystem.SetFileShortName(const FileName,ShortName:String):Boolean;
Description: To be documented
Note No Stream Support


function TFileSystem.SetFileShortNameEx(Handle:Integer; const ShortName:String):Boolean;
Description: To be documented
Note No Stream Support


function TFileSystem.GetFileSecurity(const FileName:String; Descriptor:Pointer; var Size:LongWord):Boolean;
Description: To be documented
Note None documented


function TFileSystem.SetFileSecurity(const FileName:String; Descriptor:Pointer):Boolean;
Description: To be documented
Note None documented


function TFileSystem.GetPathName(const FileName:String):String;
Description: Get the path from the supplied name (Does not include trailing slash)
Note None documented


function TFileSystem.GetShortName(const FileName:String):String;
Description: Convert the supplied name to its Short name form
Note None documented


function TFileSystem.GetLongName(const FileName:String):String;
Description: Convert the supplied name to its Long name form
Note None documented


function TFileSystem.GetTrueName(const FileName:String):String;
Description: Convert the supplied name to its True name form
Note Almost the same as GetShortName function


function TFileSystem.FileCreateEx(const FileName,ShortName:String; Mode:Integer = fmOpenReadWrite or fmShareExclusive):THandle;
Description: Create new entry or truncate existing entry and return Handle
Note Cannot create Folders with FileCreateEx

ShortName does not apply to Streams


function TFileSystem.CreateDirEx(const DirName,ShortName:String):Boolean;
Description: Create a new entry}{No File or Stream support
Note None documented


function TFileSystem.FileGetAttrEx(Handle:Integer):Integer;
Description: Get the Attributes of an existing entry with an open Handle
Note None documented


function TFileSystem.FileGetDateEx(Handle:Integer):TFileTime;
Description: Get the Date/Time of an existing entry with an open Handle
Note Returned time is UTC


function TFileSystem.FileSetDateEx(Handle:Integer; Age:TFileTime):Integer;
Description: Set the Date/Time of an existing entry with an open Handle
Note Passed time is assumed to be UTC


function TFileSystem.GetFileTime(Handle:Integer; CreateTime,AccessTime,ModifyTime:PFileTime):Boolean;
Description: Get the Dates and Times of an existing entry with an open Handle
Note Returned time is UTC


function TFileSystem.SetFileTime(Handle:Integer; CreateTime,AccessTime,ModifyTime:PFileTime):Boolean;
Description: Set the Dates and Times of an existing entry with an open Handle
Note Passed times are assumed to be UTC and are converted to Local


function TFileSystem.CloseFile(Handle:THandle):Boolean;
Description: Close open handle
Note Equivalent to Win32 CloseHandle


Return to Unit Reference