WalkOptions

import { WalkOptions } from "jsr:@ende/fs";

interface

interface WalkOptions

Options for walk and walkSync.

Properties

maxDepth

maxDepth?: number

The maximum depth of the file tree to be walked recursively.

Default: Infinity

includeFiles

includeFiles?: boolean

Indicates whether file entries should be included or not.

Default: true

includeDirs

includeDirs?: boolean

Indicates whether directory entries should be included or not.

Default: true

includeSymlinks?: boolean

Indicates whether symlink entries should be included or not. This option is meaningful only if followSymlinks is set to false.

Default: true

followSymlinks?: boolean

Indicates whether symlinks should be resolved or not.

Default: false

canonicalize

canonicalize?: boolean

Indicates whether the followed symlink's path should be canonicalized. This option works only if followSymlinks is not false.

Default: true

exts

exts?: string[]

List of file extensions used to filter entries. If specified, entries without the file extension specified by this option are excluded.

File extensions with or without a leading period are accepted.

match

match?: RegExp[]

List of regular expression patterns used to filter entries. If specified, entries that do not match the patterns specified by this option are excluded.

skip

skip?: RegExp[]

List of regular expression patterns used to filter entries. If specified, entries matching the patterns specified by this option are excluded.

Source