Unit Olf.RTL.PathAliases
Description
***************************************************************************
Librairies pour Delphi
Copyright 1990-2024 Patrick Prémartin under AGPL 3.0 license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
***************************************************************************
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://developpeur-pascal.fr/librairies-publiques.html
Project site : https://github.com/DeveloppeurPascal/librairies
*************************************************************************** File last update : 28/05/2024 12:19:15 Signature : 09e8f689b08685f76ec078b8856bd470d7651d50 ***************************************************************************
Uses
- System.Generics.Collections
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; |
Types
TKeyValueList = TDictionary<string, string>; |
TGetPathForAliasFunc = reference to function(Const AAlias: string): string; |
TGetPathForAliasEvent = function(Const AAlias: string): string of object; |
Generated by PasDoc 0.16.0.