Skip to content

Commit

Permalink
maing the statement simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham9411 committed Aug 23, 2023
1 parent fa10461 commit 7898fe0
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1001,17 +1001,9 @@ 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`.
When using the `recursive` option, please note the following caveat:
If the filter function is configured to skip certain files based on a
condition, and you are performing a recursive copy operation, be aware that
directories that do not match the filter condition will also be skipped.
This is because the filter function is applied to both files and
directories during recursion.
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
* Returns: {boolean|Promise}
Expand Down Expand Up @@ -2360,17 +2352,9 @@ 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`.
When using the `recursive` option, please note the following caveat:
If the filter function is configured to skip certain files based on a
condition, and you are performing a recursive copy operation, be aware that
directories that do not match the filter condition will also be skipped.
This is because the filter function is applied to both files and
directories during recursion.
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
* Returns: {boolean|Promise}
Expand Down Expand Up @@ -5296,16 +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`

When using the `recursive` option, please note the following caveat:

If the filter function is configured to skip certain files based on a
condition, and you are performing a recursive copy operation, be aware that
directories that do not match the filter condition will also be skipped.
This is because the filter function is applied to both files and
directories during recursion.

`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

0 comments on commit 7898fe0

Please sign in to comment.