Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7fa14fc

Browse filesBrowse files
hotpineapplerichardlau
authored andcommitted
doc: clarify glob's exclude option behavior
Add a note that negation patterns are not supported. PR-URL: #59245 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 5a8f03d commit 7fa14fc
Copy full SHA for 7fa14fc

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,9 @@ changes:
11021102
* `exclude` {Function|string\[]} Function to filter out files/directories or a
11031103
list of glob patterns to be excluded. If a function is provided, return
11041104
`true` to exclude the item, `false` to include it. **Default:** `undefined`.
1105+
If a string array is provided, each string should be a glob pattern that
1106+
specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are
1107+
not supported.
11051108
* `withFileTypes` {boolean} `true` if the glob should return paths as Dirents,
11061109
`false` otherwise. **Default:** `false`.
11071110
* Returns: {AsyncIterator} An AsyncIterator that yields the paths of files

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.