Are there standard functions to perform absolute <--> relative path conversion in Delphi?
For example:
\'C:\\Projects\\Projec
To convert to the absolute you have :
ExpandFileName
To have the relative path you have :
ExtractRelativePath
TPath.Combine(S1, S2);
Should be available since Delphi XE.
I am not too certain if this is still needed after 2+ years, but here is a way to get the Relative to Absolute (As for Absolute to Relative I would suggest philnext's ExtractRelativePath
answer):
Unit: IOUtils
Parent: TPath
function GetFullPath(const BasePath: string): string;
It will return the full, absolute path for a given relative path. If the given path is already absolute, it will just return it as is.
Here is the link at Embarcadero: Get Full Path
And here is a link for Path Manipulation Routines