fs.copy

fs.copy

fs.copy

Function

Copy files or directories to the target path.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
toStringYesNoneThe target file or directory path.

Return value

TypeDescription
BoolReturns true if the copy is successful.

Example

Notes

  • When copying a directory, the directory contents are copied recursively.