Skip to content

FileSystemManager.copyFileSync ​

JS
    FileSystemManager.copyFileSync(string srcPath, string destPath)

Copies a file

The synchronous version of FileSystemManager.copyFile

Parameters

  • string srcPath: Source file path. Only a regular file is allowed.

  • string destPath: Target file path

Parameters for caught exceptions

  • string error: Returns error information. See the figure below for valid values.

Valid values of error:

Error InformationDescription
no such file or directoryThe source file does not exist, or the parent directory of the target file path does not exist
permission deniedNo write permission for the specified target file path