Skip to main content

@std/fs@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)

Classes

c
WalkError(
cause: unknown,
root: string
)

Error thrown in walk or walkSync during iteration.

  • root: string

    File path of the root that's being walked.

Functions

f
walk(
root: string | URL,
unnamed 1?: WalkOptions
): AsyncIterableIterator<WalkEntry>

Walks the file tree rooted at root, yielding each file or directory in the tree filtered according to the given options.

f
walkSync(
root: string | URL,
unnamed 1?: WalkOptions
): IterableIterator<WalkEntry>

Same as walk but uses synchronous ops

Interfaces

I

Walk entry for walk, walkSync, expandGlob and expandGlobSync.

  • path: string

    Full path of the entry.

I

Options for walk and walkSync.

  • canonicalize: boolean

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

  • exts: string[]

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

  • Indicates whether symlinks should be resolved or not.

  • includeDirs: boolean

    Indicates whether directory entries should be included or not.

  • includeFiles: boolean

    Indicates whether file entries should be included or not.

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

  • 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.

  • skip: RegExp[]

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

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/fs

Import symbol

import * as mod from "@std/fs/walk";
or

Import directly with a jsr specifier

import * as mod from "jsr:@std/fs/walk";