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


npm i readdirp
yarn add readdirp
pnpm add readdirp


Recursive version of fs.readdir with streaming API.



function promise

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

    function readdir

    readdir: typeof readdir;


      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.


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

                                        You may also use to create a custom badge linking to

                                        • Markdown
                                        • HTML
                                          <a href=""><img src="" alt=""></a>