summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-21 10:23:22 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-21 10:23:22 +0200
commit2c5b8e5babfd70919b1ea636c23d1a790b1df0e6 (patch)
tree611ebb6f2bfcbb028810cbd2a72a7f384981b52d /src
parent5c486e196dcebff80328be6a76c54438ad0cc457 (diff)
downloadfpGUI-2c5b8e5babfd70919b1ea636c23d1a790b1df0e6.tar.xz
Add OS encoding friendly fpgExtractFilePath function.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_utils.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas
index 011319e9..c583494e 100644
--- a/src/corelib/fpg_utils.pas
+++ b/src/corelib/fpg_utils.pas
@@ -53,6 +53,7 @@ function fpgExpandFileName(const FileName: TfpgString): TfpgString;
function fpgFileExists(const FileName: TfpgString): Boolean;
function fpgDirectoryExists(const ADirectory: TfpgString): Boolean;
function fpgExtractFileDir(const FileName: TfpgString): TfpgString;
+function fpgExtractFilePath(const FileName: TfpgString): TfpgString;
implementation
@@ -126,6 +127,11 @@ begin
Result := ExtractFileDir(fpgToOSEncoding(FileName));
end;
+function fpgExtractFilePath(const FileName: TfpgString): TfpgString;
+begin
+ Result := ExtractFilePath(fpgToOSEncoding(Filename));
+end;
+
function fpgAppendPathDelim(const Path: TfpgString): TfpgString;
begin
if (Path <> '') and (Path[length(Path)] <> PathDelim) then