GetFileSize

From SCAR Divi Manual
Jump to: navigation, search

Definition

function GetFileSize(FileName: string): Int64;

Availability

SCAR Divi 3.21 > Current

Description

Returns the file size of the file given by FileName in bytes.

Example

var
  f: Integer;

begin
  f := Rewritefile(LogsPath + 'Test.txt', False);
  WriteFileString(f, 'Hello World!');
  CloseFile(f);

  WriteLn(GetFileSize(LogsPath + 'Test.txt'));

  DeleteFile(LogsPath + 'Test.txt');
end.

Output:

 12

See Also