Skip to content

WalkPathsOptions

WalkPathsOptions = object

Defined in: packages/node/src/fs/walk-paths.ts:31

readonly optional descend?: boolean | PathFilter | null

Defined in: packages/node/src/fs/walk-paths.ts:51

Which directories to descend into.

Defaults to true when any include glob contains **, and to false otherwise — a regular expression or a predicate says nothing about depth, so it stays flat. An explicit value always wins over that default.


readonly optional exclude?: PathFilter | readonly PathFilter[] | null

Defined in: packages/node/src/fs/walk-paths.ts:42

Drops the matching paths, and never descends into a matching directory. This is the pruning knob: an excluded subtree costs nothing.


readonly optional followSymlinks?: boolean | null

Defined in: packages/node/src/fs/walk-paths.ts:62

Descends through symbolic links to directories. Default false.

Enabling it costs a stat and a realpath per symlink encountered, which is what makes a link back to an ancestor detectable instead of endless.


readonly optional include?: PathFilter | readonly PathFilter[] | null

Defined in: packages/node/src/fs/walk-paths.ts:36

Yields only the paths matching one of these. Default: every path.


readonly optional maxDepth?: number | null

Defined in: packages/node/src/fs/walk-paths.ts:54

Hard depth cap; 1 is the root’s own entries. Default: unbounded.


readonly optional root?: string | null

Defined in: packages/node/src/fs/walk-paths.ts:33

Directory the walk starts from, and paths are relative to. Default ".".


readonly optional signal?: AbortSignal | null

Defined in: packages/node/src/fs/walk-paths.ts:67


readonly optional unreadable?: UnreadablePolicy | null

Defined in: packages/node/src/fs/walk-paths.ts:65

Default "require-root".