summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-24 12:52:49 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-24 12:52:49 +0200
commita64f038d58adcef99ba1fc8700de453405d87f3f (patch)
tree37b39ce0f4ab7a6706e5c2e09859d66f723f606c /src
parented0277d9646401fbef68a8980b9021915b392032 (diff)
downloadfpGUI-a64f038d58adcef99ba1fc8700de453405d87f3f.tar.xz
New wrapper (fpgChangeFileExt) created for fpGUI.
This handles the OS encoding correctly, like the other wrapper functions.
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 107fb262..a53c7efe 100644
--- a/src/corelib/fpg_utils.pas
+++ b/src/corelib/fpg_utils.pas
@@ -58,6 +58,7 @@ function fpgExtractFilePath(const FileName: TfpgString): TfpgString;
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;
implementation
@@ -151,6 +152,11 @@ begin
Result := ForceDirectories(fpgToOSEncoding(ADirectory));
end;
+function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString;
+begin
+ Result := ChangeFileExt(fpgToOSEncoding(Filename), Extension);
+end;
+
function fpgAppendPathDelim(const Path: TfpgString): TfpgString;
begin
if (Path <> '') and (Path[length(Path)] <> PathDelim) then