function FileSize(FileName: string): int64;

 

This function returns the file size of an existing file on disk.

 

Parameters

FileName

The full path of the file you want to know the size of. Ex: 'C:\Files\MyDoc.txt'

 

Return value

Int64

A 64-bit integer value containing the actual size in bytes of the specified file. If the file does not exist, the function returns -1.