diff --git a/doc/api/fs.md b/doc/api/fs.md index 527bb7f007bb7a..7fc5bbfed7c518 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -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} @@ -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} @@ -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}