Description |
The ToString method is common to many classes - here it returns the file name as the representative string for the class.
|
|
Microsoft MSDN Links |
System.IO
System.IO.FileInfo
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.IO;
var
FileInfo : System.IO.FileInfo;
begin
// Create a FileInfo object for a text file
FileInfo := System.IO.FileInfo.Create('C:\DelphiBasics.txt');
// Display the FileInfo as a string
Console.WriteLine(FileInfo.ToString);
Console.Readline;
end.
| Show full unit code | C:\DelphiBasics.txt
|
|
|
|