Skip to content

Commit

Permalink
Added options for filesystem.copy() (#316)
Browse files Browse the repository at this point in the history
* Added options for `filesystem.copy()`

* Update filesystem.md

---------

Co-authored-by: Shalitha Suranga <[email protected]>
  • Loading branch information
Sadaf-A and shalithasuranga authored May 30, 2024
1 parent a7beaaf commit 94cef02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/api/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ Copies a file or directory to a new destination. Throws `NE_FS_COPYERR` if the s
- `source` String: Source path.
- `destination` String: Destination path.

### options
- `recursive` Boolean: Copy sub-directories recursively. The default value is `true`.
- `overwrite` Boolean: Overwrite an existing file with the same name. The default value is `true`.
- `skip` Boolean: Skip an existing file with the same name. The default value is `false`.

```js
await Neutralino.filesystem.copy('./source.txt', './destination.txt');
await Neutralino.filesystem.copy('./myDir', './myDirCopy');
Expand Down

0 comments on commit 94cef02

Please sign in to comment.