$fn.copyFile(src, dest)
This function was added in v3.4.0.
Copies a file registered in the file manager to the specified path on the file manager. [Asynchronous]
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| src | string | Yes | Source file path |
| dest | string | Yes | Destination file path |
| options | object | No | Options |
Options Details
| Property Name | Type | Required | Default Value | Description |
|---|---|---|---|---|
| overwrite | boolean | No | true | Whether to overwrite existing files |
Return value
None
Sample
try { await $fn.copyFile("/xxxx/yyyy/sss.dat", "/xxxx/zzzz/sss.dat");} catch (err) { console.log("Error", err);}