Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update fs doc for filter #49289

Merged
merged 2 commits into from
Aug 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,8 @@ changes:
* `errorOnExist` {boolean} when `force` is `false`, and the destination
exists, throw an error. **Default:** `false`.
* `filter` {Function} Function to filter copied files/directories. Return
`true` to copy the item, `false` to ignore it. Can also return a `Promise`
`true` to copy the item, `false` to ignore it. When ignoring a directory,
all of its contents will be skipped as well. Can also return a `Promise`
that resolves to `true` or `false` **Default:** `undefined`.
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
Expand Down Expand Up @@ -2351,7 +2352,8 @@ changes:
* `errorOnExist` {boolean} when `force` is `false`, and the destination
exists, throw an error. **Default:** `false`.
* `filter` {Function} Function to filter copied files/directories. Return
`true` to copy the item, `false` to ignore it. Can also return a `Promise`
`true` to copy the item, `false` to ignore it. When ignoring a directory,
all of its contents will be skipped as well. Can also return a `Promise`
that resolves to `true` or `false` **Default:** `undefined`.
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
Expand Down Expand Up @@ -5278,7 +5280,8 @@ changes:
* `errorOnExist` {boolean} when `force` is `false`, and the destination
exists, throw an error. **Default:** `false`.
* `filter` {Function} Function to filter copied files/directories. Return
`true` to copy the item, `false` to ignore it. **Default:** `undefined`
`true` to copy the item, `false` to ignore it. When ignoring a directory,
all of its contents will be skipped as well. **Default:** `undefined`
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
* Returns: {boolean}
Expand Down