From fd12a773485b439cfe8ae3bc333496c9c1d9d414 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Fri, 2 Apr 2021 18:40:13 -0400 Subject: [PATCH] Clarify docs for copy*() filter Fixes #843 --- docs/copy-sync.md | 2 +- docs/copy.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/copy-sync.md b/docs/copy-sync.md index 3e5243cc8..555b6d438 100644 --- a/docs/copy-sync.md +++ b/docs/copy-sync.md @@ -9,7 +9,7 @@ Copy a file or directory. The directory can have contents. - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. - `dereference` ``: dereference symlinks, default is `false`. - `preserveTimestamps` ``: 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 to filter copied files. Return `true` to include, `false` to exclude. + - `filter` ``: Function to filter copied files/directories. Return `true` to include, `false` to exclude. ## Example: diff --git a/docs/copy.md b/docs/copy.md index 0e66da583..ceffebd02 100644 --- a/docs/copy.md +++ b/docs/copy.md @@ -9,7 +9,7 @@ Copy a file or directory. The directory can have contents. - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. - `dereference` ``: dereference symlinks, default is `false`. - `preserveTimestamps` ``: 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 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 to filter copied files/directories. Return `true` to include, `false` to exclude. Can also return a `Promise` that resolves to `true` or `false` (or pass in an `async` function). - `callback` `` - `err` ``