readdirp

  • Version 3.6.0
  • Published
  • 20.5 kB
  • 1 dependency
  • MIT license

Install

npm i readdirp
yarn add readdirp
pnpm add readdirp

Overview

Recursive version of fs.readdir with streaming API.

Index

Functions

function promise

promise: (root: string, options?: ReaddirpOptions) => Promise<EntryInfo[]>;

    function readdir

    readdir: typeof readdir;

      Interfaces

      interface EntryInfo

      interface EntryInfo {}

        property basename

        basename: string;

          property dirent

          dirent?: fs.Dirent;

            property fullPath

            fullPath: string;

              property path

              path: string;

                property stats

                stats?: fs.Stats;

                  interface ReaddirpOptions

                  interface ReaddirpOptions {}

                    property alwaysStat

                    alwaysStat?: boolean;

                      property depth

                      depth?: number;

                        property directoryFilter

                        directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean);

                          property fileFilter

                          fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);

                            property lstat

                            lstat?: boolean;

                              property root

                              root?: string;

                                property type

                                type?: 'files' | 'directories' | 'files_directories' | 'all';

                                  interface ReaddirpStream

                                  interface ReaddirpStream extends Readable, AsyncIterable<EntryInfo> {}

                                    method [Symbol.asyncIterator]

                                    [Symbol.asyncIterator]: () => AsyncIterableIterator<EntryInfo>;

                                      method read

                                      read: () => EntryInfo;

                                        Package Files (1)

                                        Dependencies (1)

                                        Dev Dependencies (9)

                                        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/readdirp.

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