diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 9154879..8c3c447 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_General.cpp b/LUA_General.cpp index 80f0a80..3ff741a 100644 --- a/LUA_General.cpp +++ b/LUA_General.cpp @@ -256,6 +256,21 @@ LuaOutText( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaExistsFile( lua_State* L) +{ + // 1 parametro : sFile + string sFile ; + LuaCheckParam( L, 1, sFile) + LuaClearStack( L) ; + // verifico esistenza file + bool bOk = ExistsFile( sFile) ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaCopyFile( lua_State* L) @@ -289,6 +304,7 @@ LuaRenameFile( lua_State* L) LuaSetParam( L, bOk) ; return 1 ; } + //------------------------------------------------------------------------------- static int LuaEraseFile( lua_State* L) @@ -418,6 +434,7 @@ LuaInstallGeneral( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtOutBox", LuaOutBox) ; bOk = bOk && luaMgr.RegisterFunction( "EgtProcessEvents", LuaProcessEvents) ; bOk = bOk && luaMgr.RegisterFunction( "EgtOutText", LuaOutText) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtExistsFile", LuaExistsFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtCopyFile", LuaCopyFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtRenameFile", LuaRenameFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtEraseFile", LuaEraseFile) ;