Skip to content

Commit 8be6f5c

Browse files
committed
doc: clarify glob's exclude option behavior
Add a note that negation patterns are not supported.
1 parent cd1a90d commit 8be6f5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/fs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,9 @@ changes:
11121112
* `exclude` {Function|string\[]} Function to filter out files/directories or a
11131113
list of glob patterns to be excluded. If a function is provided, return
11141114
`true` to exclude the item, `false` to include it. **Default:** `undefined`.
1115+
If a string array is provided, each string should be a glob pattern that
1116+
specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are
1117+
not supported.
11151118
* `withFileTypes` {boolean} `true` if the glob should return paths as Dirents,
11161119
`false` otherwise. **Default:** `false`.
11171120
* Returns: {AsyncIterator} An AsyncIterator that yields the paths of files

0 commit comments

Comments
 (0)