Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,10 @@
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: REPLACEME
description: Add support for the `followSymlinks` option.
- version:

Check warning on line 1355 in doc/api/fs.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
- v24.1.0
- v22.17.0
pr-url: https://github.com/nodejs/node/pull/58182
Expand Down Expand Up @@ -1378,11 +1381,16 @@
If a string array is provided, each string should be a glob pattern that
specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are
not supported.
* `followSymlinks` {boolean} When `true`, symbolic links to directories are
followed while expanding `**` patterns. **Default:** `false`.
* `withFileTypes` {boolean} `true` if the glob should return paths as Dirents,
`false` otherwise. **Default:** `false`.
* Returns: {AsyncIterator} An AsyncIterator that yields the paths of files
that match the pattern.

When `followSymlinks` is enabled, detected symbolic link cycles are not
traversed recursively.

```mjs
import { glob } from 'node:fs/promises';

Expand Down Expand Up @@ -3462,7 +3470,10 @@
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: REPLACEME
description: Add support for the `followSymlinks` option.
- version:

Check warning on line 3476 in doc/api/fs.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
- v24.1.0
- v22.17.0
pr-url: https://github.com/nodejs/node/pull/58182
Expand All @@ -3489,6 +3500,8 @@
* `exclude` {Function|string\[]} Function to filter out files/directories or a
list of glob patterns to be excluded. If a function is provided, return
`true` to exclude the item, `false` to include it. **Default:** `undefined`.
* `followSymlinks` {boolean} When `true`, symbolic links to directories are
followed while expanding `**` patterns. **Default:** `false`.
* `withFileTypes` {boolean} `true` if the glob should return paths as Dirents,
`false` otherwise. **Default:** `false`.

Expand All @@ -3497,6 +3510,9 @@

* Retrieves the files matching the specified pattern.

When `followSymlinks` is enabled, detected symbolic link cycles are not
traversed recursively.

```mjs
import { glob } from 'node:fs';

Expand Down Expand Up @@ -6031,12 +6047,15 @@
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: REPLACEME
description: Add support for the `followSymlinks` option.
- version:
- v24.1.0
- v22.17.0
pr-url: https://github.com/nodejs/node/pull/58182
description: Add support for `URL` instances for `cwd` option.
- version:

Check warning on line 6058 in doc/api/fs.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
- v24.0.0
- v22.17.0
pr-url: https://github.com/nodejs/node/pull/57513
Expand All @@ -6057,10 +6076,15 @@
* `exclude` {Function|string\[]} Function to filter out files/directories or a
list of glob patterns to be excluded. If a function is provided, return
`true` to exclude the item, `false` to include it. **Default:** `undefined`.
* `followSymlinks` {boolean} When `true`, symbolic links to directories are
followed while expanding `**` patterns. **Default:** `false`.
* `withFileTypes` {boolean} `true` if the glob should return paths as Dirents,
`false` otherwise. **Default:** `false`.
* Returns: {string\[]} paths of files that match the pattern.

When `followSymlinks` is enabled, detected symbolic link cycles are not
traversed recursively.

```mjs
import { globSync } from 'node:fs';

Expand Down
Loading
Loading