From SCAR Divi Manual
function FileSize(FileNum: Integer): LongInt;
SCAR Divi 3.00 > Current
Returns the file size of the file open in a stream associated with the index FileNum in the file stream resource manager. Getting the file size of a file without opening it is possible with GetFileSize.
var f: Integer; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileString(f, 'Hello World!'); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); WriteLn(FileSize(f)); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.