Skip to content

Commit 0dda724

Browse files
shubham9411targos
authored andcommitted
doc: update options.filter description for fs.cp
PR-URL: #49289 Fixes: #49092 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
1 parent d4f26f4 commit 0dda724

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/api/fs.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,8 @@ changes:
991991
* `errorOnExist` {boolean} when `force` is `false`, and the destination
992992
exists, throw an error. **Default:** `false`.
993993
* `filter` {Function} Function to filter copied files/directories. Return
994-
`true` to copy the item, `false` to ignore it. Can also return a `Promise`
994+
`true` to copy the item, `false` to ignore it. When ignoring a directory,
995+
all of its contents will be skipped as well. Can also return a `Promise`
995996
that resolves to `true` or `false` **Default:** `undefined`.
996997
* `src` {string} source path to copy.
997998
* `dest` {string} destination path to copy to.
@@ -2322,7 +2323,8 @@ changes:
23222323
* `errorOnExist` {boolean} when `force` is `false`, and the destination
23232324
exists, throw an error. **Default:** `false`.
23242325
* `filter` {Function} Function to filter copied files/directories. Return
2325-
`true` to copy the item, `false` to ignore it. Can also return a `Promise`
2326+
`true` to copy the item, `false` to ignore it. When ignoring a directory,
2327+
all of its contents will be skipped as well. Can also return a `Promise`
23262328
that resolves to `true` or `false` **Default:** `undefined`.
23272329
* `src` {string} source path to copy.
23282330
* `dest` {string} destination path to copy to.
@@ -5190,7 +5192,8 @@ changes:
51905192
* `errorOnExist` {boolean} when `force` is `false`, and the destination
51915193
exists, throw an error. **Default:** `false`.
51925194
* `filter` {Function} Function to filter copied files/directories. Return
5193-
`true` to copy the item, `false` to ignore it. **Default:** `undefined`
5195+
`true` to copy the item, `false` to ignore it. When ignoring a directory,
5196+
all of its contents will be skipped as well. **Default:** `undefined`
51945197
* `src` {string} source path to copy.
51955198
* `dest` {string} destination path to copy to.
51965199
* Returns: {boolean}

0 commit comments

Comments
 (0)