diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js
index aee55b34af..254afb029c 100644
--- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js
+++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js
@@ -6039,14 +6039,14 @@ str
/**
* @method renameFile
- * @param {String} arg0
- * @param {String} arg1
- * @param {String} arg2
- * @return {bool}
- */
-renameFile : function (
-str,
-str,
+* @param {String|String} str
+* @param {String|String} str
+* @param {String} str
+* @return {bool|bool}
+*/
+renameFile : function(
+str,
+str,
str
)
{
diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp
index 456d934e85..5352457437 100644
--- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp
+++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp
@@ -17087,26 +17087,49 @@ bool js_cocos2dx_FileUtils_renameFile(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
- JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
- js_proxy_t *proxy = jsb_get_js_proxy(obj);
- cocos2d::FileUtils* cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : NULL);
- JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FileUtils_renameFile : Invalid Native Object");
- if (argc == 3) {
- std::string arg0;
- std::string arg1;
- std::string arg2;
- ok &= jsval_to_std_string(cx, args.get(0), &arg0);
- ok &= jsval_to_std_string(cx, args.get(1), &arg1);
- ok &= jsval_to_std_string(cx, args.get(2), &arg2);
- JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_FileUtils_renameFile : Error processing arguments");
- bool ret = cobj->renameFile(arg0, arg1, arg2);
- jsval jsret = JSVAL_NULL;
- jsret = BOOLEAN_TO_JSVAL(ret);
- args.rval().set(jsret);
- return true;
- }
- JS_ReportError(cx, "js_cocos2dx_FileUtils_renameFile : wrong number of arguments: %d, was expecting %d", argc, 3);
+ JS::RootedObject obj(cx);
+ cocos2d::FileUtils* cobj = NULL;
+ obj = args.thisv().toObjectOrNull();
+ js_proxy_t *proxy = jsb_get_js_proxy(obj);
+ cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : NULL);
+ JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FileUtils_renameFile : Invalid Native Object");
+ do {
+ if (argc == 2) {
+ std::string arg0;
+ ok &= jsval_to_std_string(cx, args.get(0), &arg0);
+ if (!ok) { ok = true; break; }
+ std::string arg1;
+ ok &= jsval_to_std_string(cx, args.get(1), &arg1);
+ if (!ok) { ok = true; break; }
+ bool ret = cobj->renameFile(arg0, arg1);
+ jsval jsret = JSVAL_NULL;
+ jsret = BOOLEAN_TO_JSVAL(ret);
+ args.rval().set(jsret);
+ return true;
+ }
+ } while(0);
+
+ do {
+ if (argc == 3) {
+ std::string arg0;
+ ok &= jsval_to_std_string(cx, args.get(0), &arg0);
+ if (!ok) { ok = true; break; }
+ std::string arg1;
+ ok &= jsval_to_std_string(cx, args.get(1), &arg1);
+ if (!ok) { ok = true; break; }
+ std::string arg2;
+ ok &= jsval_to_std_string(cx, args.get(2), &arg2);
+ if (!ok) { ok = true; break; }
+ bool ret = cobj->renameFile(arg0, arg1, arg2);
+ jsval jsret = JSVAL_NULL;
+ jsret = BOOLEAN_TO_JSVAL(ret);
+ args.rval().set(jsret);
+ return true;
+ }
+ } while(0);
+
+ JS_ReportError(cx, "js_cocos2dx_FileUtils_renameFile : wrong number of arguments");
return false;
}
bool js_cocos2dx_FileUtils_loadFilenameLookupDictionaryFromFile(JSContext *cx, uint32_t argc, jsval *vp)
@@ -17791,7 +17814,7 @@ void js_register_cocos2dx_FileUtils(JSContext *cx, JS::HandleObject global) {
JS_FN("getStringFromFile", js_cocos2dx_FileUtils_getStringFromFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("removeFile", js_cocos2dx_FileUtils_removeFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isAbsolutePath", js_cocos2dx_FileUtils_isAbsolutePath, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
- JS_FN("renameFile", js_cocos2dx_FileUtils_renameFile, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
+ JS_FN("renameFile", js_cocos2dx_FileUtils_renameFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("loadFilenameLookup", js_cocos2dx_FileUtils_loadFilenameLookupDictionaryFromFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isPopupNotify", js_cocos2dx_FileUtils_isPopupNotify, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getValueVectorFromFile", js_cocos2dx_FileUtils_getValueVectorFromFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
diff --git a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua
index 1c8932a9c3..2e576f7a00 100644
--- a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua
+++ b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua
@@ -80,18 +80,15 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
--- Renames a file under the given directory.
--- param path The parent directory path of the file, it must be an absolute path.
--- param oldname The current name of the file.
--- param name The new name of the file.
--- return True if the file have been renamed successfully, false if not.
--- @function [parent=#FileUtils] renameFile
+-- @overload self, string, string
+-- @overload self, string, string, string
+-- @function [parent=#FileUtils] renameFile
-- @param self
-- @param #string path
-- @param #string oldname
-- @param #string name
-- @return bool#bool ret (return value: bool)
-
+
--------------------------------
-- Loads the filenameLookup dictionary from the contents of a filename.
-- note The plist file name should follow the format below:
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
index c250095c20..51e3aada00 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
@@ -27068,48 +27068,59 @@ int lua_cocos2dx_FileUtils_renameFile(lua_State* tolua_S)
int argc = 0;
cocos2d::FileUtils* cobj = nullptr;
bool ok = true;
-
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
-
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.FileUtils",0,&tolua_err)) goto tolua_lerror;
#endif
-
cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0);
-
#if COCOS2D_DEBUG >= 1
- if (!cobj)
+ if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_renameFile'", nullptr);
return 0;
}
#endif
-
argc = lua_gettop(tolua_S)-1;
- if (argc == 3)
- {
- std::string arg0;
- std::string arg1;
- std::string arg2;
+ do{
+ if (argc == 2) {
+ std::string arg0;
+ ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.FileUtils:renameFile");
- ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.FileUtils:renameFile");
+ if (!ok) { break; }
+ std::string arg1;
+ ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.FileUtils:renameFile");
- ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.FileUtils:renameFile");
-
- ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.FileUtils:renameFile");
- if(!ok)
- {
- tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FileUtils_renameFile'", nullptr);
- return 0;
+ if (!ok) { break; }
+ bool ret = cobj->renameFile(arg0, arg1);
+ tolua_pushboolean(tolua_S,(bool)ret);
+ return 1;
}
- bool ret = cobj->renameFile(arg0, arg1, arg2);
- tolua_pushboolean(tolua_S,(bool)ret);
- return 1;
- }
- luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:renameFile",argc, 3);
+ }while(0);
+ ok = true;
+ do{
+ if (argc == 3) {
+ std::string arg0;
+ ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.FileUtils:renameFile");
+
+ if (!ok) { break; }
+ std::string arg1;
+ ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.FileUtils:renameFile");
+
+ if (!ok) { break; }
+ std::string arg2;
+ ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.FileUtils:renameFile");
+
+ if (!ok) { break; }
+ bool ret = cobj->renameFile(arg0, arg1, arg2);
+ tolua_pushboolean(tolua_S,(bool)ret);
+ return 1;
+ }
+ }while(0);
+ ok = true;
+ luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:renameFile",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1