Difference between revisions of "Unit Filesystem"
Line 1,317: | Line 1,317: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function FSSetFileShortNameEx(AHandle: | + | <pre style="border: 0; padding-bottom:0px;">function FSSetFileShortNameEx(AHandle:THandle; const AShortName:String):Boolean;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
Revision as of 05:05, 21 November 2016
Return to Unit Reference
Description
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
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure FileSysInit;
Note | None documented |
---|
function FileSysStart:LongWord;
Note | None documented |
---|
function FileSysStop:LongWord;
Note | None documented |
---|
procedure FileSysAsyncStart(Data:Pointer);
Note | None documented |
---|
FileSystem functions (Delphi / FreePascal RTL Equivalent)
Drive functions
function FSGetPathDrive(const APath:String):Byte; inline;
Note | No Volume Support |
---|
function FSGetDriveType(ADrive:Byte):TDriveType; inline;
Note | No Volume Support |
---|
function FSGetDriveData(ADrive:Byte):TDriveData; inline;
Note | No Volume Support |
---|
function FSGetDriveAttr(ADrive:Byte):LongWord; inline;
Note | No Volume Support |
---|
function FSGetDriveLabel(ADrive:Byte):String; inline;
Note | No Volume Support |
---|
function FSSetDriveLabel(ADrive:Byte; const ALabel:String):Boolean; inline;
Note | No Volume Support |
---|
function FSGetDriveSerial(ADrive:Byte):LongWord; inline;
Note | No Volume Support |
---|
function FSSetDriveSerial(ADrive:Byte; ASerial:LongWord):Boolean; inline;
Note | No Volume Support |
---|
function FSIsDriveValid(ADrive:Byte):Boolean; inline;
Note | No Volume Support |
---|
function FSGetValidDrives:LongWord; inline;
Note | No Volume Support |
---|
function FSGetValidDriveNames:TStringList; inline;
Note | No Volume Support |
---|
function FSGetValidDriveStrings:String; inline;
Note | No Volume Support |
---|
function FSGetDriveFreeSpace(ADrive:Byte):LongWord; inline;
Note | No Volume Support |
---|
function FSGetDriveFreeSpaceEx(ADrive:Byte):Int64; inline;
Note | No Volume Support |
---|
function FSGetDriveTotalSpace(ADrive:Byte):LongWord; inline;
Note | No Volume Support |
---|
function FSGetDriveTotalSpaceEx(ADrive:Byte):Int64; inline;
Note | No Volume Support |
---|
function FSGetCurrentDrive:Byte; inline;
Note | No Volume Support |
---|
function FSSetCurrentDrive(const ADrive:String):Boolean; inline;
Note | No Volume Support |
---|
File functions
function FSFileOpen(const AFileName:String; AMode:Integer):Integer; inline;
Note | None documented |
---|
function FSFileCreate(const AFileName:String):Integer; inline;
Note | None documented |
---|
function FSDeleteFile(const AFileName:String):Boolean; inline;
Note | None documented |
---|
procedure FSFileClose(AHandle:Integer); inline;
Note | None documented |
---|
function FSRenameFile(const AOldName,ANewName:String):Boolean; inline;
Note | None documented |
---|
function FSFileSeek(AHandle,AOffset,AOrigin:Integer):Integer; inline;
Note | None documented |
---|
function FSFileFlush(AHandle:Integer):Boolean; inline;
Note | None documented |
---|
function FSFileTruncate(AHandle:Integer):Boolean; inline;
Note | None documented |
---|
function FSSetEndOfFile(AHandle:THandle):Boolean; inline;
Note | None documented |
---|
function FSEndOfFile(AHandle:Integer):Boolean; inline;
Note | None documented |
---|
function FSFilePos(AHandle:Integer):Integer; inline;
Note | None documented |
---|
function FSFileSize(AHandle:Integer):Integer; inline;
Note | None documented |
---|
function FSFileAge(const AFileName:String):Integer; inline;
Note | None documented |
---|
function FSFileExists(const AFileName:String):Boolean; inline;
Note | None documented |
---|
function FSFileGetAttr(const AFileName:String):Integer; inline;
Note | None documented |
---|
function FSFileGetDate(AHandle:Integer):Integer; inline;
Note | None documented |
---|
function FSFileSetAttr(const AFileName:String; AAttr:Integer):Integer; inline;
Note | None documented |
---|
function FSFileSetDate(AHandle:Integer; AAge:Integer):Integer; inline;
Note | None documented |
---|
function FSFileRead(AHandle:Integer; var ABuffer; ACount:Integer):Integer; inline;
Note | None documented |
---|
function FSFileWrite(AHandle:Integer; const ABuffer; ACount:Integer):Integer; inline;
Note | None documented |
---|
Directory functions
function FSCreateDir(const ADirName:String):Boolean; inline;
Note | None documented |
---|
function FSRemoveDir(const ADirName:String):Boolean; inline;
Note | None documented |
---|
function FSRenameDir(const AOldName,ANewName:String):Boolean; inline;
Note | None documented |
---|
function FSGetCurrentDir:String; inline;
Note | No Volume Support |
---|
function FSSetCurrentDir(const ADirName:String):Boolean; inline;
Note | None documented |
---|
function FSDirectoryExists(const ADirName:String):Boolean; inline;
Note | None documented |
---|
procedure FSForceDirectories(ADirName:String); inline;
Note | None documented |
---|
procedure FSDeleteTree(const ADirName:String); inline;
Note | None documented |
---|
Search functions
function FSFindFirst(const APath:String; AAttr:Integer; var ASearchRec:TSearchRec):Integer; inline;
Note | None documented |
---|
function FSFindNext(var ASearchRec:TSearchRec):Integer; inline;
Note | None documented |
---|
procedure FSFindClose(var ASearchRec:TSearchRec); inline;
Note | None documented |
---|
Additional functions
function FSFileCopy(const ASourceFile,ADestFile:String; AFailIfExists:Boolean):Boolean; inline;
Note | None documented |
---|
function FSFileCopyEx(const ASourceFile,ADestFile:String; AFailIfExists:Boolean; AUseSourceDate:Boolean; ADestDate:Integer; AUseSourceAttr:Boolean; ADestAttr:Integer):Boolean; inline;
Note | None documented |
---|
function FSGetShortName(const AFileName:String):String; inline;
Note | None documented |
---|
function FSGetLongName(const AFileName:String):String; inline;
Note | None documented |
---|
function FSGetTrueName(const AFileName:String):String; inline;
Note | None documented |
---|
Extended functions
function FSFileSeekEx(AHandle:Integer; const AOffset:Int64; AOrigin:Integer):Int64; inline;
Note | None documented |
---|
function FSEndOfFileEx(AHandle:Integer):Boolean; inline;
Note | None documented |
---|
function FSFilePosEx(AHandle:Integer):Int64; inline;
Note | None documented |
---|
function FSFileSizeEx(AHandle:THandle):Int64; inline;
Note | None documented |
---|
function FSFileAgeEx(const AFileName:String):TFileTime; inline;
Note | None documented |
---|
function FSFileGetDateEx(AHandle:Integer):TFileTime; inline;
Note | None documented |
---|
function FSFileSetDateEx(AHandle:Integer; AAge:TFileTime):Integer; inline;
Note | None documented |
---|
function FSGetFileTime(AHandle:THandle; ACreateTime,AAccessTime,AWriteTime:PFileTime):Boolean; inline;
Note | None documented |
---|
function FSSetFileTime(AHandle:THandle; ACreateTime,AAccessTime,AWriteTime:PFileTime):Boolean; inline;
Note | None documented |
---|
function FSFindFirstEx(const APath:String; var ASearchRec:TFileSearchRec):Integer; inline;
Note | None documented |
---|
function FSFindNextEx(var ASearchRec:TFileSearchRec):Integer; inline;
Note | None documented |
---|
procedure FSFindCloseEx(var ASearchRec:TFileSearchRec); inline;
Note | None documented |
---|
FileSystem functions (Win32 Compatibility)
Drive functions
function FSDefineDosDevice(const ADeviceName,ATargetPath:String; AFlags:LongWord):Boolean; inline;
Note | None documented |
---|
function FSGetDiskType(const ARootPath:String):LongWord; inline;
Note | None documented |
---|
function FSGetDiskFreeSpace(const ARootPath:String; var ASectorsPerCluster,ABytesPerSector,ANumberOfFreeClusters,ATotalNumberOfClusters:LongWord):Boolean; inline;
Note | None documented |
---|
function FSGetDiskFreeSpaceEx(const APathName:String; var AFreeBytesAvailableToCaller,ATotalNumberOfBytes,ATotalNumberOfFreeBytes:Int64):Boolean; inline;
Note | None documented |
---|
function FSGetLogicalDrives:LongWord; inline;
Note | None documented |
---|
function FSGetLogicalDriveStrings:String; inline;
Note | None documented |
---|
function FSGetVolumeInformation(const ARootPath:String; var AVolumeName:String; var AVolumeSerialNumber,AMaximumComponentLength,AFileSystemFlags:LongWord; var ASystemName:String):Boolean; inline;
Note | None documented |
---|
function FSQueryDosDevice(const ARootPath:String):String; inline;
Note | None documented |
---|
function FSSetVolumeLabel(const AVolume:String; const ALabel:String):Boolean; inline;
Note | None documented |
---|
File functions
function FSAreFileApisANSI:Boolean; inline;
Note | None documented |
---|
function FSCloseFile(AHandle:THandle):Boolean; inline;
Note | None documented |
---|
function FSCopyFile(const AExistingName,ANewName:String; AFailIfExists:Boolean):Boolean; inline;
Note | None documented |
---|
function FSCreateFile(const AFileName:String; AAccessMode,AShareMode,ACreateFlags,AFileAttributes:LongWord):THandle; inline;
Note | None documented |
---|
function FSFindCloseFile(AHandle:THandle):Boolean; inline;
Note | None documented |
---|
function FSFindFirstFile(const AFileName:String; var AFindData:TWin32FindData):THandle; inline;
Note | None documented |
---|
function FSFindNextFile(AHandle:THandle; var AFindData:TWin32FindData):Boolean; inline;
Note | None documented |
---|
function FSFlushFileBuffers(AHandle:THandle):Boolean; inline;
Note | None documented |
---|
function FSGetFileAttributes(const AFileName:String):LongWord; inline;
Note | None documented |
---|
function FSGetFileSize(AHandle:THandle; var AFileSizeHigh:LongWord):LongWord; inline;
Note | None documented |
---|
function FSGetFullPathName(const AFileName:String):String; inline;
Note | None documented |
---|
function FSGetShortPathName(const ALongPath:String):String; inline;
Note | None documented |
---|
function FSMoveFile(const AExistingName,ANewName:String):Boolean; inline;
Note | None documented |
---|
function FSReadFile(AHandle:THandle; var ABuffer; ABytesToRead:LongWord; var ABytesRead:LongWord):Boolean; inline;
Note | None documented |
---|
function FSSetFileApisToANSI:Boolean; inline;
Note | None documented |
---|
function FSSetFileApisToOEM:Boolean; inline;
Note | None documented |
---|
function FSSetFileAttributes(const AFileName:String; AFileAttributes:LongWord):Boolean; inline;
Note | None documented |
---|
function FSSetFilePointer(AHandle:THandle; ADistanceToMove:LongWord; var ADistanceToMoveHigh:LongWord; AMoveMethod:LongWord):LongWord; inline;
Note | None documented |
---|
function FSSetFilePointerEx(AHandle:THandle; const ADistanceToMove:Int64; var ANewFilePointer:Int64; AMoveMethod:LongWord):Boolean; inline;
Note | None documented |
---|
function FSWriteFile(AHandle:THandle;const ABuffer; ABytesToWrite:LongWord; var ABytesWritten:LongWord):Boolean; inline;
Note | None documented |
---|
function FSGetLongPathName(const AShortPath:String):String; inline;
Note | None documented |
---|
function FSSetFileShortName(const AFileName,AShortName:String):Boolean;
Note | None documented |
---|
function FSSetFileShortNameEx(AHandle:THandle; const AShortName:String):Boolean;
Note | None documented |
---|
function FSCreateHardLink(const ALinkName,AFileName:String):Boolean;
Note | None documented |
---|
function FSCreateSymbolicLink(const ALinkName,ATargetName:String; ADirectory:Boolean):Boolean;
Note | None documented |
---|
Directory functions
function FSCreateDirectory(const APathName:String):Boolean; inline;
Note | None documented |
---|
function FSGetCurrentDirectory:String; inline;
Note | None documented |
---|
function FSRemoveDirectory(const APathName:String):Boolean; inline;
Note | None documented |
---|
function FSSetCurrentDirectory(const APathName:String):Boolean; inline;
Note | None documented |
---|
RTL FileSystem functions
System file functions
procedure SystemDoClose(Handle:LongInt);
Note | None documented |
---|
procedure SystemDoErase(Name:PChar; NameChangeable:Boolean);
Note | None documented |
---|
procedure SystemDoRename(Name1,Name2:PChar; Name1Changeable,Name2Changeable:Boolean);
Note | None documented |
---|
function SystemDoWrite(Handle:LongInt; Address:Pointer; Len:LongInt):LongInt;
Note | None documented |
---|
function SystemDoRead(Handle:LongInt; Address:Pointer; Len:LongInt):LongInt;
Note | None documented |
---|
function SystemDoFilePos(Handle:LongInt):LongInt;
Note | None documented |
---|
procedure SystemDoSeek(Handle,Pos:LongInt);
Note | None documented |
---|
function SystemDoSeekEnd(Handle:LongInt):LongInt;
Note | None documented |
---|
function SystemDoFileSize(Handle:LongInt):LongInt;
Note | None documented |
---|
procedure SystemDoTruncate(Handle,Pos:LongInt);
Note | None documented |
---|
procedure SystemDoOpen(var F; Name:PFileTextRecChar; Flags:LongInt; NameChangeable:Boolean);
Note | FileRec and TextRec have both Handle and Mode as the first items so they could use the same routine for opening/creating.
- When (Flags and $00100) The file will be Appended
|
---|
System directory functions
procedure SystemDoMkDir(const Dir:RawByteString);
Note | None documented |
---|
procedure SystemDoRmDir(const Dir:RawByteString);
Note | None documented |
---|
procedure SystemDoChDir(const Dir:RawByteString);
Note | None documented |
---|
procedure SystemDoGetDir(Drive:Byte; var Dir:RawByteString);
Note | None documented |
---|
SysUtils file functions
function SysUtilsFileOpen(const FileName:RawByteString; Mode:Integer):LongInt;
Note | None documented |
---|
function SysUtilsFileCreate(const FileName:RawByteString):LongInt;
Note | None documented |
---|
function SysUtilsDeleteFile(const FileName:RawByteString):Boolean;
Note | None documented |
---|
procedure SysUtilsFileClose(Handle:LongInt);
Note | None documented |
---|
function SysUtilsRenameFile(const OldName,NewName:RawByteString):Boolean;
Note | None documented |
---|
function SysUtilsFileSeek(Handle,Offset,Origin:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileTruncate(Handle:THandle;Size:Int64):Boolean;
Note | None documented |
---|
function SysUtilsFileAge(const FileName:RawByteString):LongInt;
Note | None documented |
---|
function SysUtilsFileExists(const FileName:RawByteString):Boolean;
Note | None documented |
---|
function SysUtilsFileGetAttr(const FileName:RawByteString):LongInt;
Note | None documented |
---|
function SysUtilsFileGetDate(Handle:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileSetAttr(const FileName:RawByteString; Attr:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileSetDate(Handle,Age:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileRead(Handle:LongInt; out Buffer; Count:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileWrite(Handle:LongInt; const Buffer; Count:LongInt):LongInt;
Note | None documented |
---|
function SysUtilsFileSeekEx(Handle:LongInt; Offset:Int64; Origin:LongInt):Int64;
Note | None documented |
---|
function SysUtilsInternalFindFirst(const Path:RawByteString; Attr:LongInt; out SearchRec:TSearchRec; var Name:RawByteString):LongInt;
Note | None documented |
---|
function SysUtilsInternalFindNext(var SearchRec:TSearchRec; var Name:RawByteString):LongInt;
Note | None documented |
---|
procedure SysUtilsInternalFindClose(var Handle:THandle);
Note | None documented |
---|
SysUtils disk functions
function SysUtilsDiskFree(Drive:Byte):Int64;
Note | No Volume Support |
---|
function SysUtilsDiskSize(Drive:Byte):Int64;
Note | No Volume Support |
---|
function SysUtilsDirectoryExists(const Directory:RawByteString):Boolean;
Note | None documented |
---|
FileSystem logging functions
function FileSysLoggingStart(Logging:PLoggingDevice):LongWord;
Note | None documented |
---|
function FileSysLoggingStop(Logging:PLoggingDevice):LongWord;
Note | None documented |
---|
function FileSysLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Note | None documented |
---|
function FileSysLoggingSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;
Note | None documented |
---|
FileSystem helper functions
function FileSysStorageGetMediaType(Storage:PStorageDevice):TMediaType;
Note | None documented |
---|
function FileSysStorageGetController(Storage:PStorageDevice):TDiskController;
Note | None documented |
---|
procedure FileSysStorageDeviceAdd(Event:PStorageDeviceEvent);
Note | None documented |
---|
procedure FileSysStorageDeviceInsert(Event:PStorageDeviceEvent);
Note | None documented |
---|
function FileSysStorageDeviceRemove(Storage:PStorageDevice):LongWord;
Note | None documented |
---|
function FileSysStorageDeviceEject(Storage:PStorageDevice):LongWord;
Note | None documented |
---|
function FileSysStorageDeviceEnum(Storage:PStorageDevice; Data:Pointer):LongWord;
Note | None documented |
---|
function FileSysStorageDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Note | None documented |
---|
function ComparePartitions(APartition1,APartition2:Pointer):Integer;
Note | None documented |
---|
procedure FileSysLog(Level:Integer;const AText:String);
Note | None documented |
---|
procedure FileSysLogInfo(const AText:String); inline;
Note | None documented |
---|
procedure FileSysLogError(const AText:String); inline;
Note | None documented |
---|
procedure FileSysLogDebug(const AText:String); inline;
Note | None documented |
---|
procedure CacheCheckTimer(Data:Pointer);
Note | None documented |
---|
procedure EntryCheckTimer(Data:Pointer);
Note | None documented |
---|
procedure EntryProcessTimer(Data:Pointer);
Note | None documented |
---|
function MediaTypeToString(AType:TMediaType):String;
Note | None documented |
---|
function FloppyTypeToString(AType:TFloppyType):String;
Note | None documented |
---|
function ImageTypeToString(AType:TImageType):String;
Note | None documented |
---|
function DriveTypeToString(AType:TDriveType):String;
Note | None documented |
---|
function FileSysTypeToString(AType:TFileSysType):String;
Note | None documented |
---|
function StringToFileSysType(const AFileSysType:String):TFileSysType;
Note | None documented |
---|
function PartitionIdToString(AId:Byte):String;
Note | None documented |
---|
function StringToPartitionId(const APartitionId:String):Byte;
Note | None documented |
---|
function CacheModeToString(ACacheMode:TCacheMode):String;
Note | None documented |
---|
function CacheStateToString(ACacheState:TCacheState):String;
Note | None documented |
---|
function CachePageTimeToDateTime(const APageTime:Int64):TDateTime;
Note | None documented |
---|
Return to Unit Reference