Skip to main content

cp

function cp
unstable
Jump to headingcp(
source: string | URL,
destination: string | URL,
callback: (err: ErrnoException | null) => 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/.

Parameters Jump to heading

Jump to headingsource: string | URL
Jump to headingdestination: string | URL
Jump to headingcallback: (err: ErrnoException | null) => void

Return Type Jump to heading

void
Jump to headingcp(
source: string | URL,
destination: string | URL,
callback: (err: ErrnoException | null) => void,
): void

Parameters Jump to heading

Jump to headingsource: string | URL
Jump to headingdestination: string | URL
Jump to headingcallback: (err: ErrnoException | null) => void

Return Type Jump to heading

void
Back to top