ReplaceAliasesInPath Method

Replace aliases in a path by their value and remove "../" parts.

Unit: Olf.RTL.PathAliases
function ReplaceAliasesInPath(const ASourcePath: string; const AAliasList: TDictionary<string, string>; const AAllowEmptyAlias: boolean; const ABDSVersion: string = '23.0'; const AGetPathForAliasFunc: TGetPathForAliasFunc = 0): string

Parameters

ASourcePath
Type: System.string

AAliasList
Type: TDictionary< System.string , System.string >

AAllowEmptyAlias
Type: System.Boolean

ABDSVersion
Type: System.string

AGetPathForAliasFunc
Type: Olf.RTL.PathAliases.TGetPathForAliasFunc

Return Value

Type: System.string

 

Alias are used by Delphi/C++Builder/RADStudio IDE in project options and editor options. You can find $(BDS), $(PROJECTDIR) and others in your paths. The replacement is done from the Key/Value list, the registry keys (Delphi/C++Builder/RAD Studio is installed), the environment variables or asked to the call by AGetAliasProc.