@@ -34837,7 +34837,7 @@ int lua_cocos2dx_FileUtils_createDirectory(lua_State* tolua_S)
34837
34837
34838
34838
return 0;
34839
34839
}
34840
- int lua_cocos2dx_FileUtils_listFilesRecursively (lua_State* tolua_S)
34840
+ int lua_cocos2dx_FileUtils_getWritablePath (lua_State* tolua_S)
34841
34841
{
34842
34842
int argc = 0;
34843
34843
cocos2d::FileUtils* cobj = nullptr;
@@ -34857,40 +34857,34 @@ int lua_cocos2dx_FileUtils_listFilesRecursively(lua_State* tolua_S)
34857
34857
#if COCOS2D_DEBUG >= 1
34858
34858
if (!cobj)
34859
34859
{
34860
- tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_listFilesRecursively '", nullptr);
34860
+ tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_getWritablePath '", nullptr);
34861
34861
return 0;
34862
34862
}
34863
34863
#endif
34864
34864
34865
34865
argc = lua_gettop(tolua_S)-1;
34866
- if (argc == 2 )
34866
+ if (argc == 0 )
34867
34867
{
34868
- std::string arg0;
34869
- std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >* arg1;
34870
-
34871
- ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.FileUtils:listFilesRecursively");
34872
-
34873
- ok &= luaval_to_object<std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >>(tolua_S, 3, "std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >*",&arg1, "cc.FileUtils:listFilesRecursively");
34874
34868
if(!ok)
34875
34869
{
34876
- tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FileUtils_listFilesRecursively '", nullptr);
34870
+ tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FileUtils_getWritablePath '", nullptr);
34877
34871
return 0;
34878
34872
}
34879
- cobj->listFilesRecursively(arg0, arg1 );
34880
- lua_settop (tolua_S, 1 );
34873
+ std::string ret = cobj->getWritablePath( );
34874
+ lua_pushlstring (tolua_S,ret.c_str(),ret.length() );
34881
34875
return 1;
34882
34876
}
34883
- luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:listFilesRecursively ",argc, 2 );
34877
+ luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:getWritablePath ",argc, 0 );
34884
34878
return 0;
34885
34879
34886
34880
#if COCOS2D_DEBUG >= 1
34887
34881
tolua_lerror:
34888
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_listFilesRecursively '.",&tolua_err);
34882
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_getWritablePath '.",&tolua_err);
34889
34883
#endif
34890
34884
34891
34885
return 0;
34892
34886
}
34893
- int lua_cocos2dx_FileUtils_getWritablePath (lua_State* tolua_S)
34887
+ int lua_cocos2dx_FileUtils_listFilesRecursively (lua_State* tolua_S)
34894
34888
{
34895
34889
int argc = 0;
34896
34890
cocos2d::FileUtils* cobj = nullptr;
@@ -34910,29 +34904,35 @@ int lua_cocos2dx_FileUtils_getWritablePath(lua_State* tolua_S)
34910
34904
#if COCOS2D_DEBUG >= 1
34911
34905
if (!cobj)
34912
34906
{
34913
- tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_getWritablePath '", nullptr);
34907
+ tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_listFilesRecursively '", nullptr);
34914
34908
return 0;
34915
34909
}
34916
34910
#endif
34917
34911
34918
34912
argc = lua_gettop(tolua_S)-1;
34919
- if (argc == 0 )
34913
+ if (argc == 2 )
34920
34914
{
34915
+ std::string arg0;
34916
+ std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >* arg1;
34917
+
34918
+ ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.FileUtils:listFilesRecursively");
34919
+
34920
+ ok &= luaval_to_object<std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >>(tolua_S, 3, "std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > >*",&arg1, "cc.FileUtils:listFilesRecursively");
34921
34921
if(!ok)
34922
34922
{
34923
- tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FileUtils_getWritablePath '", nullptr);
34923
+ tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FileUtils_listFilesRecursively '", nullptr);
34924
34924
return 0;
34925
34925
}
34926
- std::string ret = cobj->getWritablePath( );
34927
- lua_pushlstring (tolua_S,ret.c_str(),ret.length() );
34926
+ cobj->listFilesRecursively(arg0, arg1 );
34927
+ lua_settop (tolua_S, 1 );
34928
34928
return 1;
34929
34929
}
34930
- luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:getWritablePath ",argc, 0 );
34930
+ luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:listFilesRecursively ",argc, 2 );
34931
34931
return 0;
34932
34932
34933
34933
#if COCOS2D_DEBUG >= 1
34934
34934
tolua_lerror:
34935
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_getWritablePath '.",&tolua_err);
34935
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_listFilesRecursively '.",&tolua_err);
34936
34936
#endif
34937
34937
34938
34938
return 0;
@@ -35054,8 +35054,8 @@ int lua_register_cocos2dx_FileUtils(lua_State* tolua_S)
35054
35054
tolua_function(tolua_S,"setDefaultResourceRootPath",lua_cocos2dx_FileUtils_setDefaultResourceRootPath);
35055
35055
tolua_function(tolua_S,"getSearchResolutionsOrder",lua_cocos2dx_FileUtils_getSearchResolutionsOrder);
35056
35056
tolua_function(tolua_S,"createDirectory",lua_cocos2dx_FileUtils_createDirectory);
35057
- tolua_function(tolua_S,"listFilesRecursively",lua_cocos2dx_FileUtils_listFilesRecursively);
35058
35057
tolua_function(tolua_S,"getWritablePath",lua_cocos2dx_FileUtils_getWritablePath);
35058
+ tolua_function(tolua_S,"listFilesRecursively",lua_cocos2dx_FileUtils_listFilesRecursively);
35059
35059
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_FileUtils_destroyInstance);
35060
35060
tolua_function(tolua_S,"getInstance", lua_cocos2dx_FileUtils_getInstance);
35061
35061
tolua_endmodule(tolua_S);
0 commit comments