cp

external fun cp(source: String, destination: String, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: String, destination: URL, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: URL, destination: String, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: URL, destination: URL, callback: (err: ErrnoException?) -> Unit)(source)

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/.

Since

v16.7.0

Parameters

src

source path to copy.

dest

destination path to copy to.


external fun cp(source: String, destination: String, opts: CopyOptions, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: String, destination: URL, opts: CopyOptions, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: URL, destination: String, opts: CopyOptions, callback: (err: ErrnoException?) -> Unit)(source)
external fun cp(source: URL, destination: URL, opts: CopyOptions, callback: (err: ErrnoException?) -> Unit)(source)
suspend fun cp(source: String, destination: String, opts: CopyOptions = undefined.unsafeCast<Nothing>()): Void(source)


suspend fun cp(source: String, destination: URL, opts: CopyOptions = undefined.unsafeCast<Nothing>()): Void(source)
suspend fun cp(source: URL, destination: String, opts: CopyOptions = undefined.unsafeCast<Nothing>()): Void(source)
suspend fun cp(source: URL, destination: URL, opts: CopyOptions = undefined.unsafeCast<Nothing>()): Void(source)

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/.

Since

v16.7.0

Return

Fulfills with undefined upon success.

Parameters

src

source path to copy.

dest

destination path to copy to.