SizeEx: Variant;
SizeEx: object;
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.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.ForeIO;
…
Public Shared Sub UserProc();
Var
FileInf: IFileInfo;
Begin
FileInf := New FileInfoClass.Create();
FileInf.Attach("C:\Application.log");
If FileInf.Exists Then
System.Diagnostics.Debug.WriteLine(FileInf.SizeEx);
End If;
End Sub UserProc;
See also: