diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-09-04 17:14:02 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2010-09-04 17:14:02 +0200 |
commit | 81eaad1981cf3949aeaa551ec6e5df60b1dce68a (patch) | |
tree | 83e98999b84d76552109513738bbf587d17ce68b /src/corelib/fpg_utils.pas | |
parent | 363c7a1b5559b1108460ac997589169feaa2689e (diff) | |
download | fpGUI-81eaad1981cf3949aeaa551ec6e5df60b1dce68a.tar.xz |
fpg_utils: Added two new RTL wrapper functions.
Diffstat (limited to 'src/corelib/fpg_utils.pas')
-rw-r--r-- | src/corelib/fpg_utils.pas | 12 |
1 files changed, 12 insertions, 0 deletions
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 |