oldPath
{string|Buffer|URL}newPath
{string|Buffer|URL}callback
{Function}err
{Error}
异步地把 oldPath
文件重命名为 newPath
提供的路径名。
如果 newPath
已存在,则覆盖它。
除了可能的异常,完成回调没有其他参数。
也可参见 rename(2)。
fs.rename('旧文件.txt', '新文件.txt', (err) => {
if (err) throw err;
console.log('重命名完成');
});