Unit Filesystem

From Ultibo.org
Revision as of 00:39, 7 June 2017 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Ultibo FileSystem interface unit

Numbering of Devices, Partitions, Volumes, Drives etc


Example:

Machine with 2 Floppy drives, 2 Fixed drives

Fixed Drive 1 has 2 Partitions (1 Primary and 1 Extended)

Fixed Drive 2 has 1 Partition (1 Primary)

\Floppy0 = Device 00h/Partition 0

\Floppy1 = Device 01h/Partition 0

\Harddisk0\Partition1 = Device 80h/Partition 1

\Harddisk0\Extended1 = Device 80h/Extended 1

\Harddisk0\Partition2 = Device 80h/Partition 2

\Harddisk1\Partition1 = Device 81h/Partition 1

\Volume1 = \Floppy0

\Volume2 = \Floppy1

\Volume3 = \Harddisk0\Partition1

\Volume4 = \Harddisk1\Partition1

\Volume5 = \Harddisk0\Partition2

A: = \Volume1

B: = \Volume2

C: = \Volume3 (Alternate Name = \HarddiskVolume1)

D: = \Volume4 (Alternate Name = \HarddiskVolume2)

E: = \Volume5 (Alternate Name = \HarddiskVolume3)

Constants



[Expand]
FileSystem specific constants FILESYS_*


[Expand]
FileSystem lock state FILESYS_LOCK_*


[Expand]
FileSystem cache FILESYS_CACHE_*


[Expand]
FileSystem entry timer FILESYS_ENTRY_*


[Expand]
FileSystem cache timer CACHE_TIMER_*


[Expand]
FileSystem entry timer key ENTRY_TIMER_KEY_*


[Expand]
FileSystem partition, device and volume *_PARTITION, *_DEVICE, *_VOLUME


[Expand]
FileSystem find flag FIND_FLAG_*


[Expand]
FileSystem find wildcard FIND_WILDCARD_*


[Expand]
File mode fm*Mask


[Expand]
File attribute fa*


[Expand]
FileSystem volume attribute va*


[Expand]
FileSystem device attribute da*


[Expand]
FileSystem image attribute ia*


[Expand]
FileSystem catalog attribute ca*


[Expand]
FileSystem miscellaneous NAME_HASH_SIZE*


[Expand]
FileSystem partition Id pid*


[Expand]
FileSystem device description FILESYS_*_DEVICE_DESCRIPTION


[Expand]
FileSystem controller description FILESYS_*_CONTROLLER_DESCRIPTION


[Expand]
FileSystem logging FILESYS_LOG_*


Type definitions



Storage device event

[Expand]

PStorageDeviceEvent = ^TStorageDeviceEvent;

TStorageDeviceEvent = record

Cache timer

[Expand]

PCacheTimerItem = ^TCacheTimerItem;

TCacheTimerItem = record

Entry timer

[Expand]

PEntryTimerItem = ^TEntryTimerItem;

TEntryTimerItem = record

Media type

TMediaType = (mtUNKNOWN,mtINVALID,mtFLOPPY,mtFIXED,mtREMOVABLE,mtCDROM,mtDVD,mtOTHER);

Floppy type

TFloppyType = (ftUNKNOWN,ftINVALID,ft360K,ft12M,ft720K,ft144M,ft288M,ftATAPI);

Image type

TImageType = (itUNKNOWN,itINVALID,itMEMORY,itFILE,itDEVICE,itISO,itBOCHS,itVMWARE,itVPC,itVBOX);

Cache state

TCacheState = (csCLEAN,csDIRTY);

Cache mode

TCacheMode = (cmNONE,cmREADONLY,cmREADWRITE);

Cache page type

TCachePageType = (ptNONE,ptDEVICE);

Cache page state

TCachePageState = (psUNKNOWN,psEMPTY,psCLEAN,psDIRTY);

Cache page content

TCachePageContent = (pcUNKNOWN,pcDATA,pcDIRECTORY,pcENTRY,pcSYSTEM);

Cache statistics

[Expand]

PCacheStatistics = ^TCacheStatistics;

TCacheStatistics = record

Search

[Expand]

TSearchRec = SysUtils.TRawbyteSearchRec;

TSearchRec = record

File search

[Expand]

TFileSearchRec = record

Disk search

[Expand]

TDiskSearchRec = record

Partition search

[Expand]

TPartitionSearchRec = record

Volume search

[Expand]

TVolumeSearchRec = record

Drive search

[Expand]

TDriveSearchRec = record

Image search

[Expand]

TImageSearchRec = record

Catalog search

[Expand]

TCatalogSearchRec = record

Mount search

[Expand]

TMountSearchRec = record

Junction search

[Expand]

TJunctionSearchRec = record

Stream search

[Expand]

TStreamSearchRec = record

Link search

[Expand]

TLinkSearchRec = record

FAT12/FAT16 BIOS parameter block

[Expand]

TBiosPB = packed record

FAT32 BIOS parameter block

[Expand]

TExtBiosPB = packed record

NTFS BIOS parameter block

[Expand]

TNtfsBiosPB = packed record

Partition entry

[Expand]

TPartitionEntry = packed record

Partition table

[Expand]

TPartitionTable = packed record

Master boot code

TMasterBootCode = packed array[0..445] of Byte;

Master boot record

[Expand]

PMasterBootRecord = ^TMasterBootRecord;

TMasterBootRecord = packed record

Ext master boot code

TExtMasterBootCode = packed array[0..439] of Byte;

Ext master boot record

[Expand]

PExtMasterBootRecord = ^TExtMasterBootRecord;

TExtMasterBootRecord = packed record

Partition record

[Expand]

PPartitionRecord = ^TPartitionRecord;

TPartitionRecord = packed record

Sector

[Expand]

PSector = ^TSector;

TSector = packed array[0..511] of Byte;

Boot sector jump

TBootSectorJump = packed array[0..2] of Byte;

Boot sector code

TBootSectorCode = packed array[0..447] of Byte;

Boot sector

[Expand]

PBootSector = ^TBootSector;

TBootSector = packed record

Ext boot sector jump

TExtBootSectorJump = packed array[0..2] of Byte;

Ext boot sector code

TExtBootSectorCode = packed array[0..419] of Byte;

Ext boot sector

[Expand]

PExtBootSector = ^TExtBootSector;

TExtBootSector = packed record

NTFS boot sector jump

TNtfsBootSectorJump = packed array[0..2] of Byte;

NTFS boot sector code

TNtfsBootSectorCode = packed array[0..425] of Byte;

NTFS boot sector

[Expand]

PNtfsBootSector = ^TNtfsBootSector;

TNtfsBootSector = packed record

EXTFS boot sector

[Expand]

PExtfsBootSector = ^TExtfsBootSector;

TExtfsBootSector = packed record

FileSystem logging

[Expand]

PFileSysLogging = ^TFileSysLogging;

TFileSysLogging = record


Class definitions



File system driver

[Expand]

TFileSysDriver = class(TObject)

File system list

[Expand]

TFileSysList = class(TLinkedObjList)

File system list extended

[Expand]

TFileSysListEx = class(TLinkedObjList)

File system tree

[Expand]

TFileSysTree = class(TLinkedObjTree)

Disk drive

[Expand]

TDiskDrive = class(TListObject)

Raw handle

[Expand]

TRawHandle = class(TListObject)

Enumerate handle

[Expand]

TEnumHandle = class(TListObject)

File handle

[Expand]

TFileHandle = class(TListObject)

Find handle

[Expand]

TFindHandle = class(TListObject)

Disk controller

[Expand]

TDiskController = class(TListObject)

Disk device

[Expand]

TDiskDevice = class(TListObject)

Disk partition

[Expand]

TDiskPartition = class(TListObject)

Disk volume

[Expand]

TDiskVolume = class(TListObject)

Disk image

[Expand]

TDiskImage = class(TListObject)

Recognizer

[Expand]

TRecognizer = class(TListObject)

Redirector

[Expand]

TRedirector = class(TListObject)

Disk partitioner

[Expand]

TDiskPartitioner = class(TObject)

Disk formatter

[Expand]

TDiskFormatter = class(TObject)

Disk defragger

[Expand]

TDiskDefragger = class(TObject)

Disk converter

[Expand]

TDiskConverter = class(TObject)

Disk repairer

[Expand]

TDiskRepairer = class(TObject)

Disk resizer

[Expand]

TDiskResizer = class(TObject)

Disk copier

[Expand]

TDiskCopier = class(TObject)

Disk imager

[Expand]

TDiskImager = class(TObject)

File system

[Expand]

TFileSystem = class(TListObject)

Disk chunk

[Expand]

TDiskChunk = class(TListObject)

Disk table

[Expand]

TDiskTable = class(TListObject)

Disk block

[Expand]

TDiskBlock = class(TListObject)

Disk entry

[Expand]

TDiskEntry = class(TTreeObject)

Disk catalog

[Expand]

TDiskCatalog = class(TListObject)

Disk reparse

[Expand]

TDiskReparse = class(TObject)

Disk security

[Expand]

TDiskSecurity = class(TObject)

Disk access control list

[Expand]

TDiskAcl = class(TListObject)

Disk access control entry

[Expand]

TDiskAce = class(TListObject)

Cache

[Expand]

TCache = class(TObject)

Cache extended

[Expand]

TCacheEx = class(TCache)

Hash cache

[Expand]

THashCache = class(TObject)

Incremental cache

[Expand]

TIncrementalCache = class(TObject)

Cache page

[Expand]

TCachePage = class(TObject)

Hash cache page

[Expand]

THashCachePage = class(TCachePage)

Incremental cache page

[Expand]

TIncrementalCachePage = class(THashCachePage)

Cache timer

[Expand]

TCacheTimer = class(TObject)

Hash cache timer

[Expand]

THashCacheTimer = class(TObject)

Incremental cache timer

[Expand]

TIncrementalCacheTimer = class(TObject)

Cache thread

[Expand]

TCacheThread = class(TThread)

Hash cache thread

[Expand]

THashCacheThread = class(TThread)

Incremental cache thread

[Expand]

TIncrementalCacheThread = class(TThread)

Entry timer

[Expand]

TEntryTimer = class(TObject)

Default recognizer

[Expand]

TDefaultRecognizer = class(TRecognizer)

Default partitioner

[Expand]

TDefaultPartitioner = class(TDiskPartitioner)

Extended disk controller

[Expand]

TExtDiskController = class(TDiskController)

ATA disk controller

[Expand]

TATADiskController = class(TDiskController)

ATAPI disk controller

[Expand]

TATAPIDiskController = class(TDiskController)

SCSI disk contoller

[Expand]

TSCSIDiskController = class(TDiskController)

USB disk controller

[Expand]

TUSBDiskController = class(TExtDiskController)

MMC disk controller

[Expand]

TMMCDiskController = class(TExtDiskController)

File system handle stream

[Expand]

TFSHandleStream = class(TStream)

File system file stream

[Expand]

TFSFileStream = class(TFSHandleStream)

File system handle stream extended

[Expand]

TFSHandleStreamEx = class(TStreamEx)

File system file stream extended

[Expand]

TFSFileStreamEx = class(TFSHandleStreamEx)


Public variables



FileSystem logging

FILESYS_DEFAULT_LOG_LEVEL:LongWord = FILESYS_LOG_LEVEL_DEBUG; Minimum level for FileSystem messages. Only messages with level greater than or equal to this will be printed.
FILESYS_LOG_ENABLED:Boolean;

FileSystem specific variables

FileSysDriver:TFileSysDriver;


Function declarations



Initialization functions

[Expand]
procedure FileSysInit;
Description: To be documented


[Expand]
function FileSysStart:LongWord;
Description: To be documented


[Expand]
function FileSysStop:LongWord;
Description: To be documented


[Expand]
procedure FileSysAsyncStart(Data:Pointer);
Description: To be documented


FileSystem functions (Delphi/FreePascal RTL Equivalent)

Drive functions

[Expand]
function FSGetPathDrive(const APath:String):Byte; inline;
Description: To be documented


[Expand]
function FSGetDriveType(ADrive:Byte):TDriveType; inline;
Description: To be documented


[Expand]
function FSGetDriveData(ADrive:Byte):TDriveData; inline;
Description: To be documented


[Expand]
function FSGetDriveAttr(ADrive:Byte):LongWord; inline;
Description: To be documented


[Expand]
function FSGetDriveLabel(ADrive:Byte):String; inline;
Description: To be documented


[Expand]
function FSSetDriveLabel(ADrive:Byte; const ALabel:String):Boolean; inline;
Description: To be documented


[Expand]
function FSGetDriveSerial(ADrive:Byte):LongWord; inline;
Description: To be documented


[Expand]
function FSSetDriveSerial(ADrive:Byte; ASerial:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSIsDriveValid(ADrive:Byte):Boolean; inline;
Description: To be documented


[Expand]
function FSGetValidDrives:LongWord; inline;
Description: To be documented


[Expand]
function FSGetValidDriveNames:TStringList; inline;
Description: To be documented


[Expand]
function FSGetValidDriveStrings:String; inline;
Description: To be documented


[Expand]
function FSGetDriveFreeSpace(ADrive:Byte):LongWord; inline;
Description: To be documented


[Expand]
function FSGetDriveFreeSpaceEx(ADrive:Byte):Int64; inline;
Description: To be documented


[Expand]
function FSGetDriveTotalSpace(ADrive:Byte):LongWord; inline;
Description: To be documented


[Expand]
function FSGetDriveTotalSpaceEx(ADrive:Byte):Int64; inline;
Description: To be documented


[Expand]
function FSGetCurrentDrive:Byte; inline;
Description: To be documented


[Expand]
function FSSetCurrentDrive(const ADrive:String):Boolean; inline;
Description: To be documented


File functions

[Expand]
function FSFileOpen(const AFileName:String; AMode:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileCreate(const AFileName:String):Integer; inline;
Description: To be documented


[Expand]
function FSDeleteFile(const AFileName:String):Boolean; inline;
Description: To be documented


[Expand]
procedure FSFileClose(AHandle:Integer); inline;
Description: To be documented


[Expand]
function FSRenameFile(const AOldName,ANewName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSFileSeek(AHandle,AOffset,AOrigin:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileFlush(AHandle:Integer):Boolean; inline;
Description: To be documented


[Expand]
function FSFileTruncate(AHandle:Integer):Boolean; inline;
Description: To be documented


[Expand]
function FSSetEndOfFile(AHandle:THandle):Boolean; inline;
Description: To be documented


[Expand]
function FSEndOfFile(AHandle:Integer):Boolean; inline;
Description: To be documented


[Expand]
function FSFilePos(AHandle:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileSize(AHandle:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileAge(const AFileName:String):Integer; inline;
Description: To be documented


[Expand]
function FSFileExists(const AFileName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSFileGetAttr(const AFileName:String):Integer; inline;
Description: To be documented


[Expand]
function FSFileGetDate(AHandle:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileSetAttr(const AFileName:String; AAttr:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileSetDate(AHandle:Integer; AAge:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileRead(AHandle:Integer; var ABuffer; ACount:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileWrite(AHandle:Integer; const ABuffer; ACount:Integer):Integer; inline;
Description: To be documented


Directory functions

[Expand]
function FSCreateDir(const ADirName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSRemoveDir(const ADirName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSRenameDir(const AOldName,ANewName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSGetCurrentDir:String; inline;
Description: To be documented


[Expand]
function FSSetCurrentDir(const ADirName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSDirectoryExists(const ADirName:String):Boolean; inline;
Description: To be documented


[Expand]
procedure FSForceDirectories(ADirName:String); inline;
Description: To be documented


[Expand]
procedure FSDeleteTree(const ADirName:String); inline;
Description: To be documented


Search functions

[Expand]
function FSFindFirst(const APath:String; AAttr:Integer; var ASearchRec:TSearchRec):Integer; inline;
Description: To be documented


[Expand]
function FSFindNext(var ASearchRec:TSearchRec):Integer; inline;
Description: To be documented


[Expand]
procedure FSFindClose(var ASearchRec:TSearchRec); inline;
Description: To be documented


Additional functions

[Expand]
function FSFileCopy(const ASourceFile,ADestFile:String; AFailIfExists:Boolean):Boolean; inline;
Description: To be documented


[Expand]
function FSFileCopyEx(const ASourceFile,ADestFile:String; AFailIfExists:Boolean; AUseSourceDate:Boolean; ADestDate:Integer; AUseSourceAttr:Boolean; ADestAttr:Integer):Boolean; inline;
Description: To be documented


[Expand]
function FSGetShortName(const AFileName:String):String; inline;
Description: To be documented


[Expand]
function FSGetLongName(const AFileName:String):String; inline;
Description: To be documented


[Expand]
function FSGetTrueName(const AFileName:String):String; inline;
Description: To be documented


Extended functions

[Expand]
function FSFileSeekEx(AHandle:Integer; const AOffset:Int64; AOrigin:Integer):Int64; inline;
Description: To be documented


[Expand]
function FSEndOfFileEx(AHandle:Integer):Boolean; inline;
Description: To be documented


[Expand]
function FSFilePosEx(AHandle:Integer):Int64; inline;
Description: To be documented


[Expand]
function FSFileSizeEx(AHandle:THandle):Int64; inline;
Description: To be documented


[Expand]
function FSFileAgeEx(const AFileName:String):TFileTime; inline;
Description: To be documented


[Expand]
function FSFileGetAttrEx(AHandle:Integer):Integer; inline;
Description: To be documented


[Expand]
function FSFileGetDateEx(AHandle:Integer):TFileTime; inline;
Description: To be documented


[Expand]
function FSFileSetDateEx(AHandle:Integer; AAge:TFileTime):Integer; inline;
Description: To be documented


[Expand]
function FSGetFileTime(AHandle:THandle; ACreateTime,AAccessTime,AWriteTime:PFileTime):Boolean; inline;
Description: To be documented


[Expand]
function FSSetFileTime(AHandle:THandle; ACreateTime,AAccessTime,AWriteTime:PFileTime):Boolean; inline;
Description: To be documented


[Expand]
function FSFindFirstEx(const APath:String; var ASearchRec:TFileSearchRec):Integer; inline;
Description: To be documented


[Expand]
function FSFindNextEx(var ASearchRec:TFileSearchRec):Integer; inline;
Description: To be documented


[Expand]
procedure FSFindCloseEx(var ASearchRec:TFileSearchRec); inline;
Description: To be documented


FileSystem functions (Win32 Compatibility)

Drive functions

[Expand]
function FSDefineDosDevice(const ADeviceName,ATargetPath:String; AFlags:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSGetDiskType(const ARootPath:String):LongWord; inline;
Description: Equivalent to Win32 GetDriveType


[Expand]
function FSGetDiskFreeSpace(const ARootPath:String; var ASectorsPerCluster,ABytesPerSector,ANumberOfFreeClusters,ATotalNumberOfClusters:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSGetDiskFreeSpaceEx(const APathName:String; var AFreeBytesAvailableToCaller,ATotalNumberOfBytes,ATotalNumberOfFreeBytes:Int64):Boolean; inline;
Description: To be documented


[Expand]
function FSGetLogicalDrives:LongWord; inline;
Description: To be documented


[Expand]
function FSGetLogicalDriveStrings:String; inline;
Description: To be documented


[Expand]
function FSGetVolumeInformation(const ARootPath:String; var AVolumeName:String; var AVolumeSerialNumber,AMaximumComponentLength,AFileSystemFlags:LongWord; var ASystemName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSQueryDosDevice(const ARootPath:String):String; inline;
Description: To be documented


[Expand]
function FSSetVolumeLabel(const AVolume:String; const ALabel:String):Boolean; inline;
Description: To be documented


File functions

[Expand]
function FSAreFileApisANSI:Boolean; inline;
Description: To be documented


[Expand]
function FSCloseFile(AHandle:THandle):Boolean; inline;
Description: Equivalent to Win32 CloseHandle


[Expand]
function FSCopyFile(const AExistingName,ANewName:String; AFailIfExists:Boolean):Boolean; inline;
Description: To be documented


[Expand]
function FSCreateFile(const AFileName:String; AAccessMode,AShareMode,ACreateFlags,AFileAttributes:LongWord):THandle; inline;
Description: To be documented


[Expand]
function FSFindCloseFile(AHandle:THandle):Boolean; inline;
Description: Equivalent to Win32 FindClose


[Expand]
function FSFindFirstFile(const AFileName:String; var AFindData:TWin32FindData):THandle; inline;
Description: To be documented


[Expand]
function FSFindNextFile(AHandle:THandle; var AFindData:TWin32FindData):Boolean; inline;
Description: To be documented


[Expand]
function FSFlushFileBuffers(AHandle:THandle):Boolean; inline;
Description: To be documented


[Expand]
function FSGetFileAttributes(const AFileName:String):LongWord; inline;
Description: To be documented


[Expand]
function FSGetFileSize(AHandle:THandle; var AFileSizeHigh:LongWord):LongWord; inline;
Description: To be documented


[Expand]
function FSGetFullPathName(const AFileName:String):String; inline;
Description: To be documented


[Expand]
function FSGetShortPathName(const ALongPath:String):String; inline;
Description: To be documented


[Expand]
function FSMoveFile(const AExistingName,ANewName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSReadFile(AHandle:THandle; var ABuffer; ABytesToRead:LongWord; var ABytesRead:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSSetFileApisToANSI:Boolean; inline;
Description: To be documented


[Expand]
function FSSetFileApisToOEM:Boolean; inline;
Description: To be documented


[Expand]
function FSSetFileAttributes(const AFileName:String; AFileAttributes:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSSetFilePointer(AHandle:THandle; ADistanceToMove:LongWord; var ADistanceToMoveHigh:LongWord; AMoveMethod:LongWord):LongWord; inline;
Description: To be documented


[Expand]
function FSSetFilePointerEx(AHandle:THandle; const ADistanceToMove:Int64; var ANewFilePointer:Int64; AMoveMethod:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSWriteFile(AHandle:THandle;const ABuffer; ABytesToWrite:LongWord; var ABytesWritten:LongWord):Boolean; inline;
Description: To be documented


[Expand]
function FSGetLongPathName(const AShortPath:String):String; inline;
Description: To be documented


[Expand]
function FSSetFileShortName(const AFileName,AShortName:String):Boolean;
Description: To be documented


[Expand]
function FSSetFileShortNameEx(AHandle:THandle; const AShortName:String):Boolean;
Description: To be documented


[Expand]
function FSCreateHardLink(const ALinkName,AFileName:String):Boolean;
Description: To be documented


[Expand]
function FSCreateSymbolicLink(const ALinkName,ATargetName:String; ADirectory:Boolean):Boolean;
Description: To be documented


Directory functions

[Expand]
function FSCreateDirectory(const APathName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSGetCurrentDirectory:String; inline;
Description: To be documented


[Expand]
function FSRemoveDirectory(const APathName:String):Boolean; inline;
Description: To be documented


[Expand]
function FSSetCurrentDirectory(const APathName:String):Boolean; inline;
Description: To be documented


RTL FileSystem functions

System file functions

[Expand]
procedure SystemDoClose(Handle:THandle);
Description: To be documented


[Expand]
procedure SystemDoErase(Name:PChar; NameChangeable:Boolean);
Description: To be documented


[Expand]
procedure SystemDoRename(Name1,Name2:PChar; Name1Changeable,Name2Changeable:Boolean);
Description: To be documented


[Expand]
function SystemDoWrite(Handle:THandle; Address:Pointer; Len:LongInt):LongInt;
Description: To be documented


[Expand]
function SystemDoRead(Handle:THandle; Address:Pointer; Len:LongInt):LongInt;
Description: To be documented


[Expand]
function SystemDoFilePos(Handle:THandle):LongInt;
Description: To be documented


[Expand]
procedure SystemDoSeek(Handle:THandle; Pos:LongInt);
Description: To be documented


[Expand]
function SystemDoSeekEnd(Handle:THandle):LongInt;
Description: To be documented


[Expand]
function SystemDoFileSize(Handle:THandle):LongInt;
Description: To be documented


[Expand]
procedure SystemDoTruncate(Handle:THandle; Pos:LongInt);
Description: To be documented


[Expand]
procedure SystemDoOpen(var F; Name:PFileTextRecChar; Flags:LongInt; NameChangeable:Boolean);
Description: To be documented


System directory functions

[Expand]
procedure SystemDoMkDir(const Dir:RawByteString);
Description: To be documented


[Expand]
procedure SystemDoRmDir(const Dir:RawByteString);
Description: To be documented


[Expand]
procedure SystemDoChDir(const Dir:RawByteString);
Description: To be documented


[Expand]
procedure SystemDoGetDir(Drive:Byte; var Dir:RawByteString);
Description: To be documented


Dos disk functions

[Expand]
function DosDiskFree(Drive:Byte):Int64;
Description: To be documented


[Expand]
function DosDiskSize(Drive:Byte):Int64;
Description: To be documented


Dos FindFirst/FindNext functions

[Expand]
function DosFindMatchingFile(var f:SearchRec):Integer;
Description: Internal Only


[Expand]
function DosFindFirst(const Path:PathStr; Attr:Word; var f:SearchRec):Integer;
Description: To be documented


[Expand]
function DosFindNext(var f:SearchRec):Integer;
Description: To be documented


[Expand]
procedure DosFindClose(var f:SearchRec);
Description: To be documented


Dos file functions

[Expand]
function DosGetFTime(var f; var Time:LongInt):Integer;
Description: To be documented


[Expand]
function DosSetFTime(var f; Time:LongInt):Integer;
Description: To be documented


[Expand]
function DosGetFAttr(var f; var Attr:Word):Integer;
Description: To be documented


[Expand]
function DosSetFAttr(var f; Attr:Word):Integer;
Description: To be documented


[Expand]
function DosGetShortName(var p:ShortString):Boolean;
Description: To be documented


[Expand]
function DosGetLongName(var p:ShortString):Boolean;
Description: To be documented


SysUtils file functions

[Expand]
function SysUtilsFileOpen(const FileName:RawByteString; Mode:Integer):THandle;
Description: To be documented


[Expand]
function SysUtilsFileCreate(const FileName:RawByteString):THandle;
Description: To be documented


[Expand]
function SysUtilsDeleteFile(const FileName:RawByteString):Boolean;
Description: To be documented


[Expand]
procedure SysUtilsFileClose(Handle:THandle);
Description: To be documented


[Expand]
function SysUtilsRenameFile(const OldName,NewName:RawByteString):Boolean;
Description: To be documented


[Expand]
function SysUtilsFileSeek(Handle:THandle; Offset,Origin:LongInt):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileTruncate(Handle:THandle;Size:Int64):Boolean;
Description: To be documented


[Expand]
function SysUtilsFileAge(const FileName:RawByteString):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileExists(const FileName:RawByteString):Boolean;
Description: To be documented


[Expand]
function SysUtilsFileGetAttr(const FileName:RawByteString):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileGetDate(Handle:THandle):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileSetAttr(const FileName:RawByteString; Attr:LongInt):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileSetDate(Handle:THandle; Age:LongInt):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileRead(Handle:THandle; out Buffer; Count:LongInt):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileWrite(Handle:THandle; const Buffer; Count:LongInt):LongInt;
Description: To be documented


[Expand]
function SysUtilsFileSeekEx(Handle:THandle; Offset:Int64; Origin:LongInt):Int64;
Description: To be documented


[Expand]
function SysUtilsInternalFindFirst(const Path:RawByteString; Attr:LongInt; out SearchRec:TSearchRec; var Name:RawByteString):LongInt;
Description: To be documented


[Expand]
function SysUtilsInternalFindNext(var SearchRec:TSearchRec; var Name:RawByteString):LongInt;
Description: To be documented


[Expand]
procedure SysUtilsInternalFindClose(var Handle:THandle);
Description: To be documented


SysUtils disk functions

[Expand]
function SysUtilsDiskFree(Drive:Byte):Int64;
Description: To be documented


[Expand]
function SysUtilsDiskSize(Drive:Byte):Int64;
Description: To be documented


[Expand]
function SysUtilsDirectoryExists(const Directory:RawByteString):Boolean;
Description: To be documented


FileSystem logging functions

[Expand]
function FileSysLoggingStart(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function FileSysLoggingStop(Logging:PLoggingDevice):LongWord;
Description: To be documented


[Expand]
function FileSysLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Description: To be documented


[Expand]
function FileSysLoggingSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;
Description: To be documented


FileSystem helper functions

[Expand]
function FileSysStorageGetMediaType(Storage:PStorageDevice):TMediaType;
Description: To be documented


[Expand]
function FileSysStorageGetController(Storage:PStorageDevice):TDiskController;
Description: To be documented


[Expand]
procedure FileSysStorageDeviceAdd(Event:PStorageDeviceEvent);
Description: To be documented


[Expand]
procedure FileSysStorageDeviceInsert(Event:PStorageDeviceEvent);
Description: To be documented


[Expand]
function FileSysStorageDeviceRemove(Storage:PStorageDevice):LongWord;
Description: To be documented


[Expand]
function FileSysStorageDeviceEject(Storage:PStorageDevice):LongWord;
Description: To be documented


[Expand]
function FileSysStorageDeviceEnum(Storage:PStorageDevice; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function FileSysStorageDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Description: To be documented


[Expand]
function ComparePartitions(APartition1,APartition2:Pointer):Integer;
Description: Sort partitions in order of start sector


[Expand]
procedure FileSysLog(Level:Integer;const AText:String);
Description: To be documented


[Expand]
procedure FileSysLogInfo(const AText:String); inline;
Description: To be documented


[Expand]
procedure FileSysLogError(const AText:String); inline;
Description: To be documented


[Expand]
procedure FileSysLogDebug(const AText:String); inline;
Description: To be documented


[Expand]
procedure CacheCheckTimer(Data:Pointer);
Description: To be documented


[Expand]
procedure EntryCheckTimer(Data:Pointer);
Description: To be documented


[Expand]
procedure EntryProcessTimer(Data:Pointer);
Description: To be documented


[Expand]
function MediaTypeToString(AType:TMediaType):String;
Description: To be documented


[Expand]
function FloppyTypeToString(AType:TFloppyType):String;
Description: To be documented


[Expand]
function ImageTypeToString(AType:TImageType):String;
Description: To be documented


[Expand]
function DriveTypeToString(AType:TDriveType):String;
Description: To be documented


[Expand]
function FileSysTypeToString(AType:TFileSysType):String;
Description: To be documented


[Expand]
function StringToFileSysType(const AFileSysType:String):TFileSysType;
Description: To be documented


[Expand]
function PartitionIdToString(AId:Byte):String;
Description: To be documented


[Expand]
function StringToPartitionId(const APartitionId:String):Byte;
Description: To be documented


[Expand]
function CacheModeToString(ACacheMode:TCacheMode):String;
Description: To be documented


[Expand]
function CacheStateToString(ACacheState:TCacheState):String;
Description: To be documented


[Expand]
function CachePageTimeToDateTime(const APageTime:Int64):TDateTime;
Description: To be documented


Return to Unit Reference