Are there standard functions to perform absolute <--> relative path conversion in Delphi?
For example:
\'C:\\Projects\\Projec
I just brewed this together:
uses
ShLwApi;
function RelToAbs(const ARelPath, ABasePath: string): string;
begin
SetLength(Result, MAX_PATH);
if PathCombine(@Result[1], PChar(IncludeTrailingPathDelimiter(ABasePath)), PChar(ARelPath)) = nil then
Result := ''
else
SetLength(Result, StrLen(@Result[1]));
end;
Thanks to Andreas and David for calling my attention to the Shell Path Handling Functions.