GetFileSize

From SCAR Divi Manual
Revision as of 14:35, 3 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function GetFileSize(FileName: string): Int64; </source> ==Availability== SCAR Divi 3.21 > Current ==Description== Returns the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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