diff --git a/mdl/m_fileio.pas b/mdl/m_fileio.pas index 163bb9c..d4c2339 100644 --- a/mdl/m_fileio.pas +++ b/mdl/m_fileio.pas @@ -39,6 +39,7 @@ Procedure DirClean (Path: String; Exempt: String); Function FileRename (OldFN, NewFN: String) : Boolean; Function FileCopy (Source, Target: String) : Boolean; Function FileFind (FN: String) : String; +Function FileByteSize (FN: String) : Int64; { GLOBAL FILEIO VARIABLES AND CONSTANTS } @@ -746,4 +747,17 @@ Begin FindClose(Dir); End; -End. \ No newline at end of file +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.