diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-18 10:35:36 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-18 10:35:36 +0000 |
commit | e4412c9704fd7938739d5e6dc1c9daa8e8212b8f (patch) | |
tree | ab6fa1f0a5b4474843401482b9dd68561f001498 /src/corelib/fpg_utils.pas | |
parent | bd19c7d966bcf7b1f7cf5f91eaae0347d5b29b39 (diff) | |
download | fpGUI-e4412c9704fd7938739d5e6dc1c9daa8e8212b8f.tar.xz |
utils: Adds a new RTL wrapper to handle UTF-8 path names correctly.
Diffstat (limited to 'src/corelib/fpg_utils.pas')
-rw-r--r-- | src/corelib/fpg_utils.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index dcc0cf71..9d0e907d 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -63,6 +63,7 @@ function fpgExtractFileDir(const FileName: TfpgString): TfpgString; function fpgExtractFilePath(const FileName: TfpgString): TfpgString; function fpgExtractFileName(const FileName: TfpgString): TfpgString; function fpgExtractFileExt(const FileName: TfpgString): TfpgString; +function fpgExtractRelativepath(const ABaseName, ADestName: TfpgString): TfpgString; function fpgForceDirectories(const ADirectory: TfpgString): Boolean; function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; function fpgGetAppConfigDir(const Global: Boolean): TfpgString; @@ -164,6 +165,11 @@ begin Result := ExtractFileExt(fpgToOSEncoding(Filename)); end; +function fpgExtractRelativepath(const ABaseName, ADestName: TfpgString): TfpgString; +begin + Result := ExtractRelativepath(fpgToOSEncoding(ABaseName), fpgToOSEncoding(ADestName)); +end; + function fpgForceDirectories(const ADirectory: TfpgString): Boolean; begin Result := ForceDirectories(fpgToOSEncoding(ADirectory)); |