happy-opfs • Docs
happy-opfs / copy
function copy(
srcPath,
destPath,
options?): AsyncVoidIOResult
Copies a file or directory from one location to another same as cp -r
.
Both srcPath
and destPath
must both be a file or directory.
Parameter | Type | Description |
---|---|---|
srcPath |
string |
The source file/directory path. |
destPath |
string |
The destination file/directory path. |
options ? |
CopyOptions |
The copy options. |
AsyncVoidIOResult
A promise that resolves to an AsyncVoidIOResult
indicating whether the file was successfully copied.