RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.ExtractRelativePath Function

Return file path name relative to base name.

Pascal
function ExtractRelativePath(const BaseName: AnsiString; const DestName: AnsiString): AnsiString; overload;
C++
AnsiString ExtractRelativePath(const AnsiString BaseName, const AnsiString DestName);

ExtractRelativePath returns a file path name from DestName relative to the given BaseName. It strips the common path directories and adds '..\' on Windows, and '../' on Linux for each level up from the BaseName path. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!