From 81eaad1981cf3949aeaa551ec6e5df60b1dce68a Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 4 Sep 2010 17:14:02 +0200 Subject: fpg_utils: Added two new RTL wrapper functions. --- src/corelib/fpg_utils.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 7c7869b4..78848e40 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -62,6 +62,8 @@ function fpgExtractFileName(const FileName: TfpgString): TfpgString; function fpgExtractFileExt(const FileName: TfpgString): TfpgString; function fpgForceDirectories(const ADirectory: TfpgString): Boolean; function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; +function fpgGetAppConfigDir(const Global: Boolean): TfpgString; +function fpgGetAppConfigFile(const Global: Boolean; const SubDir: Boolean): TfpgString; implementation @@ -160,6 +162,16 @@ begin Result := ChangeFileExt(fpgToOSEncoding(Filename), Extension); end; +function fpgGetAppConfigDir(const Global: Boolean): TfpgString; +begin + Result := fpgFromOSEncoding(GetAppConfigDir(Global)); +end; + +function fpgGetAppConfigFile(const Global: Boolean; const SubDir: Boolean): TfpgString; +begin + Result := fpgFromOSEncoding(GetAppConfigFile(Global, SubDir)); +end; + function fpgAppendPathDelim(const Path: TfpgString): TfpgString; begin if (Path <> '') and (Path[length(Path)] <> PathDelim) then -- cgit v1.2.3-70-g09d2