FileByteSize function
This commit is contained in:
parent
faeea67a7a
commit
dc488533f9
|
@ -39,6 +39,7 @@ Procedure DirClean (Path: String; Exempt: String);
|
||||||
Function FileRename (OldFN, NewFN: String) : Boolean;
|
Function FileRename (OldFN, NewFN: String) : Boolean;
|
||||||
Function FileCopy (Source, Target: String) : Boolean;
|
Function FileCopy (Source, Target: String) : Boolean;
|
||||||
Function FileFind (FN: String) : String;
|
Function FileFind (FN: String) : String;
|
||||||
|
Function FileByteSize (FN: String) : Int64;
|
||||||
|
|
||||||
{ GLOBAL FILEIO VARIABLES AND CONSTANTS }
|
{ GLOBAL FILEIO VARIABLES AND CONSTANTS }
|
||||||
|
|
||||||
|
@ -746,4 +747,17 @@ Begin
|
||||||
FindClose(Dir);
|
FindClose(Dir);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function FileByteSize (FN: String) : Int64;
|
||||||
|
Var
|
||||||
|
Dir : SearchRec;
|
||||||
|
Begin
|
||||||
|
Result := -1;
|
||||||
|
|
||||||
|
FindFirst (FN, AnyFile, Dir);
|
||||||
|
|
||||||
|
If DosError = 0 Then Result := Dir.Size;
|
||||||
|
|
||||||
|
FindClose(Dir);
|
||||||
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
Loading…
Reference in New Issue