copyFile

abstract fun copyFile(src: Path, dest: Path, mode: Int = 0, callback: (Throwable?) -> Unit? = null)
abstract fun copyFile(src: Value, dest: Value, mode: Value?, callback: Value)

Method: fs.copyFile

Copies the contents at the provided src path to the provided dest path, using the given mode (if specified) as modifiers for the copy operation; default value for mode is 0.

callback is dispatched once the copy operation completes.

Parameters

src

The source path to copy from.

dest

The destination path to copy to.

mode

The mode to use for the copy operation.

callback

The callback to provide the results or an error.


abstract fun copyFile(src: Value, dest: Value, callback: Value)

Method: fs.copyFile

Copies the contents at the provided src path to the provided dest path. callback is dispatched once the copy operation completes.

Parameters

src

The source path to copy from.

dest

The destination path to copy to.

callback

The callback to provide the results or an error.