SizeEx: Variant;
The Size property returns a file size in bytes.
The file can be of any size.
Executing the example requires the C:\Application.log file in the file system.
Add a link to the IO system assembly.
Sub UserProc;
Var
FileInf: IFileInfo;
Begin
FileInf := New FileInfo.Attach("C:\Application.log");
If FileInf.Exists Then
Debug.WriteLine(FileInf.SizeEx);
End If;
Dispose FileInf;
End Sub UserProc;
After executing the example the console window displays the size of the C:\Application.log file.
See also: