Sign in Join
FPDoc Onlineexperiment

FileSize function

In unit FileUtil

Gets the size for the specified file name.

Declaration

pascal
function FileSize(const Filename: string): Int64; overload

Arguments

Filename

The name of the file examined in the routine.

Function result

Returns the size of the file, or -1 if the file does not exist.

Description

FileSize is an overloaded Int64 function used to get the size for the file specified in the FileName parameter. FileSize is similar to the FileSize routine in the FPC RTL, but accepts a file name instead of a FileRec argument.

FileSize calls FileSizeUtf8 to get the return value for the function.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.