Unit Olf.RTL.PathAliases

Description

C2PP ***************************************************************************

My libraries for Delphi Copyright (c) 1990-2026 Patrick PREMARTIN

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

***************************************************************************

This repository contains functions, procedures and classes to use in Delphi projects (console, VCL, FireMonkey and others). It's my "everything reuseable things" toolbox.

The units to be used in your projects can be found in the "src" folder. Some features are explained on my blog or have been coded live on Twitch.

Examples of use in the form of VCL or FireMonkey projects are available in the "samples" subfolder.

***************************************************************************

Author(s) : Patrick PREMARTIN

Site : https://librairies.developpeur-pascal.fr

Project site : https://github.com/DeveloppeurPascal/librairies

*************************************************************************** File last update : 2026-03-30T16:35:19.664+02:00 Signature : 33247fecaa2cca4288fd48c157106c00862ca4fc ***************************************************************************

Uses

Overview

Functions and Procedures

function ReplaceAliasesInPath(Const ASourcePath: string; Const AAliasList: TKeyValueList; Const AAllowEmptyAlias: boolean = false; Const ABDSVersion: string = '23.0' ; Const AGetPathForAliasFunc: TGetPathForAliasFunc = nil): string; overload;
function ReplaceAliasesInPath(Const ASourcePath: string; Const AAliasList: TKeyValueList; Const AAllowEmptyAlias: boolean; Const ABDSVersion: string; Const AGetPathForAliasEvent: TGetPathForAliasEvent) : string; overload;

Types

TKeyValueList = TDictionary<string, string>;
TGetPathForAliasFunc = reference to function(Const AAlias: string): string;
TGetPathForAliasEvent = function(Const AAlias: string): string of object;

Description

Functions and Procedures

function ReplaceAliasesInPath(Const ASourcePath: string; Const AAliasList: TKeyValueList; Const AAllowEmptyAlias: boolean = false; Const ABDSVersion: string = '23.0' ; Const AGetPathForAliasFunc: TGetPathForAliasFunc = nil): string; overload;

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

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.

function ReplaceAliasesInPath(Const ASourcePath: string; Const AAliasList: TKeyValueList; Const AAllowEmptyAlias: boolean; Const ABDSVersion: string; Const AGetPathForAliasEvent: TGetPathForAliasEvent) : string; overload;

This item has no description.

Types

TKeyValueList = TDictionary<string, string>;

This item has no description.

TGetPathForAliasFunc = reference to function(Const AAlias: string): string;

This item has no description.

TGetPathForAliasEvent = function(Const AAlias: string): string of object;

This item has no description.

My libraries for Delphi (c) 1990-2026 Patrick PREMARTIN - Powered by PasDoc
Generated by PasDoc 1.0.2.