* Added GetDriveIDFromLetter, bug ID #28318

git-svn-id: trunk@33300 -
This commit is contained in:
michael 2016-03-20 19:04:49 +00:00
parent f1a7d07f8e
commit 5085009410
2 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,14 @@
**********************************************************************}
function GetDriveIDFromLetter(Const ADrive : PathStr) : Byte;
begin
if length(ADrive)=0 then
Result:=0
else
Result := (Ord(ADrive[1]))-64;
end;
{$push}
{$i-}

View File

@ -21,9 +21,11 @@ Function SetCurrentDir (Const NewDir : RawByteString) : Boolean;
Function CreateDir (Const NewDir : RawByteString) : Boolean;
Function RemoveDir (Const Dir : RawByteString) : Boolean;
Function ForceDirectories(Const Dir: RawByteString): Boolean;
Function GetDriveIDFromLetter(Const ADrive : RawByteString) : Byte;
Function SetCurrentDir (Const NewDir : UnicodeString) : Boolean;
Function CreateDir (Const NewDir : UnicodeString) : Boolean;
Function RemoveDir (Const Dir : UnicodeString) : Boolean;
Function ForceDirectories(Const Dir: UnicodeString): Boolean;
Function GetDriveIDFromLetter(Const ADrive : UnicodeString) : Byte;