FileSystemManager.renameSync
JS
FileSystemManager.renameSync(string oldPath, string newPath)Rename a file
The synchronous version of FileSystemManager.rename
Parameters
string oldPath: Source file path; can be a regular file or a directory
string newPath: New file path
Parameters of the captured exception
- string error: Returns the error message; see the table below for valid values
Valid values of error:
| Error message | Description |
|---|---|
| no such file or directory | The source file does not exist, or the parent directory of the target file path does not exist |
| permission denied | No write permission |
