Interface WalkOptions

Options for walk and walkSync.

interface WalkOptions {
    canonicalize?: boolean;
    exts?: string[];
    followSymlinks?: boolean;
    includeDirs?: boolean;
    includeFiles?: boolean;
    includeSymlinks?: boolean;
    match?: RegExp[];
    maxDepth?: number;
    skip?: RegExp[];
}

Properties

canonicalize?: boolean

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

{true}
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.

{[]}
followSymlinks?: boolean

Indicates whether symlinks should be resolved or not.

{false}
includeDirs?: boolean

Indicates whether directory entries should be included or not.

{true}
includeFiles?: boolean

Indicates whether file entries should be included or not.

{true}
includeSymlinks?: boolean

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

{true}
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.

maxDepth?: number

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

{Infinity}
skip?: RegExp[]

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