From 5e7cf81f13b156e8d4f0703321bf479789bd9496 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Fri, 30 Sep 2011 02:33:16 +0200 Subject: [PATCH] Resolve bug #309. --- Units/MMLAddon/PSInc/Wrappers/file.inc | 5 +++++ Units/MMLAddon/PSInc/psexportedmethods.inc | 1 + 2 files changed, 6 insertions(+) diff --git a/Units/MMLAddon/PSInc/Wrappers/file.inc b/Units/MMLAddon/PSInc/Wrappers/file.inc index f2b1589..ff88571 100644 --- a/Units/MMLAddon/PSInc/Wrappers/file.inc +++ b/Units/MMLAddon/PSInc/Wrappers/file.inc @@ -101,6 +101,11 @@ begin result := GetDirectories(path); end; +function ps_DeleteFile(const Filename: string): Boolean; extdecl; +begin + Result := DeleteFileUTF8(Filename); +end; + procedure ps_WriteINI(const Section, KeyName, NewString, FileName: string);extdecl; var tempini : TIniFile; diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index 3cdedd5..0884b66 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -156,6 +156,7 @@ AddFunction(@ps_FileExists,'function FileExists (const FileName : string ) : Boo AddFunction(@ps_ForceDirectores,'function ForceDirectories(const dir : string) : boolean;'); AddFunction(@ps_GetFiles,'function GetFiles(const Path, Ext : string) : TStringArray;'); AddFunction(@ps_GetDirectories,'function GetDirectories(const path : string) : TStringArray;'); +AddFunction(@ps_DeleteFile, 'function DeleteFile(const Filename: string): Boolean;'); AddFunction(@ps_WriteINI,'procedure WriteINI(const Section, KeyName, NewString, FileName: string);'); AddFunction(@ps_ReadINI,'function ReadINI(const Section, KeyName, FileName: string): string;'); AddFunction(@ps_DeleteINI,'procedure DeleteINI(const Section, KeyName, FileName: string);');