@nodelib/fs.scandir

  • Version 3.0.0
  • Published
  • 17.8 kB
  • 2 dependencies
  • MIT license

Install

npm i @nodelib/fs.scandir
yarn add @nodelib/fs.scandir
pnpm add @nodelib/fs.scandir

Overview

List files and directories inside the specified directory

Index

Functions

function scandir

scandir: typeof scandir;

    function scandirSync

    scandirSync: (path: string, optionsOrSettings?: Options | Settings) => Entry[];

      Classes

      class Settings

      class Settings {}

        constructor

        constructor(options?: Options);
          readonly followSymbolicLinks: boolean;

            property fs

            readonly fs: any;

              property fsStatSettings

              readonly fsStatSettings: fsStat.Settings;

                property pathSegmentSeparator

                readonly pathSegmentSeparator: string;

                  property stats

                  readonly stats: boolean;
                    readonly throwErrorOnBrokenSymbolicLink: boolean;

                      Interfaces

                      interface Entry

                      interface Entry {}

                        property dirent

                        dirent: Dirent;

                          property name

                          name: string;

                            property path

                            path: string;

                              property stats

                              stats?: Stats;

                                interface Options

                                interface Options {}
                                  followSymbolicLinks?: boolean;

                                    property fs

                                    fs?: Partial<fs.FileSystemAdapter>;

                                      property pathSegmentSeparator

                                      pathSegmentSeparator?: string;

                                        property stats

                                        stats?: boolean;
                                          throwErrorOnBrokenSymbolicLink?: boolean;

                                            Type Aliases

                                            type AsyncCallback

                                            type AsyncCallback = (error: ErrnoException | null, entries: Entry[]) => void;

                                              type Dirent

                                              type Dirent = fs.Dirent;

                                                type FileSystemAdapter

                                                type FileSystemAdapter = fsStat.FileSystemAdapter & {
                                                readdir: ReaddirAsynchronousMethod;
                                                readdirSync: ReaddirSynchronousMethod;
                                                };

                                                  type ReaddirAsynchronousMethod

                                                  type ReaddirAsynchronousMethod = (
                                                  filepath: string,
                                                  options: {
                                                  withFileTypes: true;
                                                  },
                                                  callback: (error: ErrnoException | null, files: Dirent[]) => void
                                                  ) => void;

                                                    type ReaddirSynchronousMethod

                                                    type ReaddirSynchronousMethod = (
                                                    filepath: string,
                                                    options: {
                                                    withFileTypes: true;
                                                    }
                                                    ) => Dirent[];

                                                      Namespaces

                                                      namespace scandir

                                                      namespace scandir {}

                                                        Package Files (5)

                                                        Dependencies (2)

                                                        Dev Dependencies (3)

                                                        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/@nodelib/fs.scandir.

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