FileSystemManager.copyFileSync
JS
FileSystemManager.copyFileSync(string srcPath, string destPath)拷贝文件
FileSystemManager.copyFile 的同步版本
参数
string srcPath: 源文件路径,只可以是普通文件
string destPath: 目标文件路径
捕获异常的参数
- string error: 返回错误信息,具体合法值见下图
error 的合法值说明:
| 错误信息 | 说明 |
|---|---|
| no such file or directory | 源文件不存在,或目标文件路径的上层目录不存在 |
| permission denied | 指定目标文件路径没有写权限 |