Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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,6 +1349,9 @@ behavior is similar to `cp dir1/ dir2/`.
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/62695
description: Add support for the `followSymlinks` option.
- version:
- v24.1.0
- v22.17.0
Expand Down Expand Up @@ -1378,11 +1381,16 @@ changes:
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,6 +3470,9 @@ descriptor. See [`fs.utimes()`][].
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/62695
description: Add support for the `followSymlinks` option.
- version:
- v24.1.0
- v22.17.0
Expand Down Expand Up @@ -3489,6 +3500,8 @@ changes:
* `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 @@ changes:

* 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,6 +6047,9 @@ Synchronous version of [`fs.futimes()`][]. Returns `undefined`.
<!-- YAML
added: v22.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/62695
description: Add support for the `followSymlinks` option.
- version:
- v24.1.0
- v22.17.0
Expand All @@ -6057,10 +6076,15 @@ changes:
* `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