Skip to content

$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

NameTypeRequiredDescription
srcstringYesSource file path
deststringYesDestination file path
optionsobjectNoOptions

Options Details

Property NameTypeRequiredDefault ValueDescription
overwritebooleanNotrueWhether 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);
}