lsr

  • Version 2.0.0
  • Published
  • 3 dependencies
  • MIT license

Install

npm i lsr
yarn add lsr
pnpm add lsr

Overview

Recursive readdir (`ls -R`)

Index

Functions

function lsrAsync

lsrAsync: {
(dir: string, options: Options, callback: Callback): void;
(dir: string, callback: Callback): void;
(dir: string, options?: Options): Promise<FileSystemEntry[]>;
};

    function lsrStream

    lsrStream: (dir: string, options: Options) => any;

      function lsrSync

      lsrSync: (dir: string, options?: Options) => Array<FileSystemEntry>;

        Interfaces

        interface FileSystemEntry

        interface FileSystemEntry {}

          property atime

          atime: Date;

            property birthtime

            birthtime: Date;

              property blksize

              blksize: number;

                property blocks

                blocks: number;

                  property ctime

                  ctime: Date;

                    property dev

                    dev: number;

                      property fullPath

                      fullPath: string;
                      • The asbolute path to the file. Uses "/" on unix and "\" on most windows. e.g. "C:\\Users\Forbes Lidnesay\File.js"

                      property gid

                      gid: number;

                        property ino

                        ino: number;

                          property mode

                          mode: number;

                            property mtime

                            mtime: Date;

                              property name

                              name: string;
                              • The filename, e.g. "index.js"

                              nlink: number;

                                property path

                                path: string;
                                • The path relative to the starting directory. e.g. "path/to/file.js"

                                  N.B. "\" is normalized to "/" even on windows.

                                property rdev

                                rdev: number;

                                  property size

                                  size: number;

                                    property uid

                                    uid: number;

                                      method isBlockDevice

                                      isBlockDevice: () => boolean;

                                        method isCharacterDevice

                                        isCharacterDevice: () => boolean;

                                          method isDirectory

                                          isDirectory: () => boolean;

                                            method isFIFO

                                            isFIFO: () => boolean;

                                              method isFile

                                              isFile: () => boolean;

                                                method isSocket

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

                                                    interface Options

                                                    interface Options {}

                                                      property filter

                                                      filter?: (entry: FileSystemEntry) => boolean;

                                                        property filterPath

                                                        filterPath?: (path: string) => boolean;

                                                          property highWaterMark

                                                          highWaterMark?: number;

                                                            property ignoreErrors

                                                            ignoreErrors?: boolean;

                                                              Type Aliases

                                                              type Callback

                                                              type Callback = (err: Error | void | null, result: Array<FileSystemEntry>) => void;

                                                                Package Files (1)

                                                                Dependencies (3)

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

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