@types/walk

  • Version 2.3.4
  • Published
  • 6.59 kB
  • 1 dependency
  • MIT license

Install

npm i @types/walk
yarn add @types/walk
pnpm add @types/walk

Overview

TypeScript definitions for walk

Index

Functions

function walk

walk: (path: string, options?: WalkOptions) => Walker;

    function walkSync

    walkSync: (path: string, options?: WalkOptions) => Walker;

      Interfaces

      interface Walker

      interface Walker {}

        method on

        on: {
        (event: 'names', cb: WalkNamesEventCallback): void;
        (event: WalkStatArrayEvent, cb: WalkStatArrayEventCallback): void;
        (event: WalkStatEvent, cb: WalkStatEventCallback): void;
        (event: 'end', cb: () => void): void;
        };

          method pause

          pause: () => void;

            method resume

            resume: () => void;

              interface WalkOptions

              interface WalkOptions {}

                property filters

                filters?: string[] | undefined;
                  followLinks?: boolean | undefined;

                    property listeners

                    listeners?: WalkOptionsListeners | undefined;

                      interface WalkOptionsListeners

                      interface WalkOptionsListeners {}

                        property directories

                        directories?: WalkStatArrayEventCallback | undefined;

                          property directory

                          directory?: WalkStatEventCallback | undefined;

                            property directoryError

                            directoryError?: WalkStatArrayEventCallback | undefined;

                              property end

                              end?: WalkStatArrayEventCallback | undefined;

                                property errors

                                errors?: WalkStatArrayEventCallback | undefined;

                                  property file

                                  file?: WalkStatEventCallback | undefined;

                                    property files

                                    files?: WalkStatArrayEventCallback | undefined;

                                      property names

                                      names?: WalkNamesEventCallback | undefined;

                                        property nodeError

                                        nodeError?: WalkStatArrayEventCallback | undefined;

                                          interface WalkStats

                                          interface WalkStats extends Stats {}

                                            property error

                                            error?: NodeJS.ErrnoException | undefined;

                                              property name

                                              name: string;

                                                property type

                                                type:
                                                | 'file'
                                                | 'directory'
                                                | 'symbolicLink'
                                                | 'blockDevice'
                                                | 'characterDevice'
                                                | 'FIFO'
                                                | 'socket';

                                                  Type Aliases

                                                  type WalkNamesEventCallback

                                                  type WalkNamesEventCallback = (
                                                  base: string,
                                                  names: string[],
                                                  next: WalkNext
                                                  ) => void;

                                                    type WalkNext

                                                    type WalkNext = () => void;

                                                      type WalkStatArrayEvent

                                                      type WalkStatArrayEvent =
                                                      | 'files'
                                                      | 'directories'
                                                      | 'errors'
                                                      | 'nodeError'
                                                      | 'directoryError';

                                                        type WalkStatArrayEventCallback

                                                        type WalkStatArrayEventCallback = (
                                                        base: string,
                                                        names: WalkStats[],
                                                        next: WalkNext
                                                        ) => void;

                                                          type WalkStatEvent

                                                          type WalkStatEvent = 'file' | 'directory';

                                                            type WalkStatEventCallback

                                                            type WalkStatEventCallback = (
                                                            base: string,
                                                            names: WalkStats,
                                                            next: WalkNext
                                                            ) => void;

                                                              Package Files (1)

                                                              Dependencies (1)

                                                              Dev Dependencies (0)

                                                              No dev dependencies.

                                                              Peer Dependencies (0)

                                                              No peer dependencies.

                                                              Badge

                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/walk.

                                                              • Markdown
                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/walk)
                                                              • HTML
                                                                <a href="https://www.jsdocs.io/package/@types/walk"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>