Пример #1
0
 static int GetWritePath(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         CFramework.FileUtil obj = (CFramework.FileUtil)ToLua.CheckObject <CFramework.FileUtil>(L, 1);
         string arg0             = ToLua.CheckString(L, 2);
         string o = obj.GetWritePath(arg0);
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #2
0
 static int CopyFolderTo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         CFramework.FileUtil obj = (CFramework.FileUtil)ToLua.CheckObject <CFramework.FileUtil>(L, 1);
         string arg0             = ToLua.CheckString(L, 2);
         string arg1             = ToLua.CheckString(L, 3);
         obj.CopyFolderTo(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
    static int _CreateCFramework_FileUtil(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                CFramework.FileUtil obj = new CFramework.FileUtil();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: CFramework.FileUtil.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }