阅读(3518) (0)

微信小游戏开发文档-小游戏文件API string FileSystemManager.renameSync(string oldPath, string newPath)

2017-12-29 14:49:23 更新

string FileSystemManager.renameSync(string oldPath, string newPath)

FileSystemManager.rename 的同步版本

参数

string oldPath

源文件路径,可以是普通文件或目录

string newPath

新文件路径

返回值

string errMsg

错误信息

errMsg 的合法值

说明
fail permission denied, rename ${oldPath} -> ${newPath} 指定源文件或目标文件没有写权限
fail no such file or directory, rename ${oldPath} -> ${newPath} 源文件不存在,或目标文件路径的上层目录不存在