Skip to content

Commit

Permalink
Clarify docs for copy*() filter (#884)
Browse files Browse the repository at this point in the history
* Clarify docs for copy*() filter

Fixes #843

* Implement suggestion

#884 (comment)
  • Loading branch information
RyanZim authored Apr 8, 2021
1 parent f4a880d commit 24731f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/copy-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Copy a file or directory. The directory can have contents.
- `errorOnExist` `<boolean>`: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`.
- `dereference` `<boolean>`: dereference symlinks, default is `false`.
- `preserveTimestamps` `<boolean>`: When true, will set last modification and access times to the ones of the original source files. When false, timestamp behavior is OS-dependent. Default is `false`.
- `filter` `<Function>`: Function to filter copied files. Return `true` to include, `false` to exclude.
- `filter` `<Function>`: Function to filter copied files/directories. Return `true` to copy the item, `false` to ignore it.

## Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Copy a file or directory. The directory can have contents.
- `errorOnExist` `<boolean>`: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`.
- `dereference` `<boolean>`: dereference symlinks, default is `false`.
- `preserveTimestamps` `<boolean>`: When true, will set last modification and access times to the ones of the original source files. When false, timestamp behavior is OS-dependent. Default is `false`.
- `filter` `<Function>`: Function to filter copied files. Return `true` to include, `false` to exclude. Can also return a `Promise` that resolves to `true` or `false` (or pass in an `async` function).
- `filter` `<Function>`: Function to filter copied files/directories. Return `true` to copy the item, `false` to ignore it. Can also return a `Promise` that resolves to `true` or `false` (or pass in an `async` function).
- `callback` `<Function>`
- `err` `<Error>`

Expand Down

0 comments on commit 24731f1

Please sign in to comment.