@nodelib/fs.scandir

  • Version 2.1.5
  • Published
  • 22.2 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: any;

                property pathSegmentSeparator

                readonly pathSegmentSeparator: string;

                  property stats

                  readonly stats: boolean;
                    readonly throwErrorOnBrokenSymbolicLink: boolean;

                      Interfaces

                      interface Dirent

                      interface Dirent {}

                        property isBlockDevice

                        isBlockDevice: () => boolean;

                          property isCharacterDevice

                          isCharacterDevice: () => boolean;

                            property isDirectory

                            isDirectory: () => boolean;

                              property isFIFO

                              isFIFO: () => boolean;

                                property isFile

                                isFile: () => boolean;

                                  property isSocket

                                  isSocket: () => boolean;
                                    isSymbolicLink: () => boolean;

                                      property name

                                      name: string;

                                        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;

                                                              interface ReaddirAsynchronousMethod

                                                              interface ReaddirAsynchronousMethod {}

                                                                call signature

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

                                                                  call signature

                                                                  (
                                                                  filepath: string,
                                                                  callback: (error: ErrnoException | null, files: string[]) => void
                                                                  ): void;

                                                                    interface ReaddirSynchronousMethod

                                                                    interface ReaddirSynchronousMethod {}

                                                                      call signature

                                                                      (
                                                                      filepath: string,
                                                                      options: {
                                                                      withFileTypes: true;
                                                                      }
                                                                      ): Dirent[];

                                                                        call signature

                                                                        (filepath: string): string[];

                                                                          Type Aliases

                                                                          type AsyncCallback

                                                                          type AsyncCallback = async.AsyncCallback;

                                                                            type FileSystemAdapter

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

                                                                              Namespaces

                                                                              namespace scandir

                                                                              namespace scandir {}

                                                                                Package Files (4)

                                                                                Dependencies (2)

                                                                                Dev Dependencies (2)

                                                                                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>