Description |
If the specified PathString is relative (IsPathRooted = false), the GetFullPath method will return the current directory value suffixed by PathString, with a directory separator added inbetween.
Otherwise, PathString is returned unchanged.
|
|
Microsoft MSDN Links |
System.IO
System.IO.Path
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.IO;
var
PathString : String;
begin
PathString := 'C:\Delphi\DelphiBasics.txt';
Console.WriteLine('{0} full path :', PathString);
Console.WriteLine(System.IO.Path.GetFullPath(PathString));
Console.WriteLine;
PathString := 'Unit1.pas';
Console.WriteLine('{0} full path :', PathString);
Console.WriteLine(System.IO.Path.GetFullPath(PathString));
Console.Readline;
end.
| Show full unit code | C:\Delphi\DelphiBasics.txt full path :
C:\Delphi\DelphiBasics.txt
Uni1.pas full path :
C:\Documents and Settings\Neil\My Documents\Borland Studio Projects\Unit1.pas
|
|
|
|