Skip to main content

LensStudio:FileSystem.copyDir

Function

Options can take recursive and force.

copyDir(src, dest, options): void

Options can take recursive and force. The recursive parameter controls whether to read into subdirectories. The force parameter controls whether duplicated contents will be overwritten during the copying process.

fs.copyDir(Tests.srcDir, Tests.destDir, {force: true, recursive: true});
fs.copyDir(Tests.srcDir, Tests.destDir, null);
fs.copyDir(Tests.srcDir, Tests.destDir, {});
fs.copyDir(Tests.srcDir, Tests.destDir, {force: false});

Parameters

ParameterType
srcPath
destPath
optionsCopyDirOptions

Returns

void