function EndOfFile(FileNum: Integer): Boolean;
SCAR Divi 3.00 > Current
Returns true if your position in the file stream associated with the index FileNum in the file stream resource manager is at the end of the stream. This is always true when writing a file in SCAR Divi and only true when you have read the entire file when reading.
var f: Integer; s: string; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileString(f, 'Hello World!'); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); WriteLn(EndOfFile(f)); ReadFileString(f, s, FileSize(f)); WriteLn(EndOfFile(f)); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.