Skip to content

Commit 1f9519b

Browse files
committed
doc(fs): clarify path.matchesGlob() exclude limitation
Clarify that path.matchesGlob() only performs pattern matching, and does not support the exclude functionality available in fs.glob methods. This addresses potential user confusion as noted in code review feedback. Refs: #58988
1 parent 45a5d32 commit 1f9519b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/fs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,8 @@ const { glob } = require('node:fs/promises');
11861186
* For better performance with large directory trees, consider using more specific
11871187
patterns to reduce the search scope
11881188
1189-
The same glob pattern syntax is supported by [`path.matchesGlob()`][] for
1190-
matching paths without file system access.
1189+
[`path.matchesGlob()`][] supports the same basic glob pattern syntax for
1190+
in-memory path matching, but does not include the `exclude` option.
11911191
11921192
### `fsPromises.lchmod(path, mode)`
11931193

0 commit comments

Comments
 (0)