Home  |  Delphi .net Home  |  System.IO.Path  |  GetFullPath Method
  
GetFullPath  
Method  
Gets the full path for a relative Path string
Path Class
System.IO NameSpace
CF1.  Procedure GetFullPath ( PathString : String ) ; Static;
CF : Methods with this mark are Compact Framework Compatible
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
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
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.
   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
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author