function
fs.cp
callback: (err: null | ErrnoException) => void
): void;
Asynchronously copies the entire directory structure from src to dest, including subdirectories and files.
When copying a directory to another directory, globs are not supported and behavior is similar to cp dir1/ dir2/.
callback: (err: null | ErrnoException) => void
): void;
Asynchronously copies the entire directory structure from src to dest, including subdirectories and files.
When copying a directory to another directory, globs are not supported and behavior is similar to cp dir1/ dir2/.
Referenced types
interface CopyOptions
- filter?: (source: string, destination: string) => boolean | Promise<boolean>
Function to filter copied files/directories. Return
trueto copy the item,falseto ignore it. - force?: boolean
Overwrite existing file or directory. _The copy operation will ignore errors if you set this to false and the destination exists. Use the
errorOnExistoption to change this behavior.