Interface FSOption

An object that will be used to override the default fs methods. Any methods that are not overridden will use Node's built-in implementations.

  • lstatSync
  • readdir (callback withFileTypes Dirent variant, used for readdirCB and most walks)
  • readdirSync
  • readlinkSync
  • realpathSync
  • promises: Object containing the following async methods:
    • lstat
    • readdir (Dirent variant only)
    • readlink
    • realpath

Hierarchy

  • FSOption

Indexable

[k: string]: any

Properties

lstatSync?: ((path: string) => Stats)

Type declaration

    • (path: string): Stats
    • Parameters

      • path: string

      Returns Stats

promises?: {
    lstat?: ((path: string) => Promise<Stats>);
    readdir?: ((path: string, options: {
        withFileTypes: true;
    }) => Promise<Dirent[]>);
    readlink?: ((path: string) => Promise<string>);
    realpath?: ((path: string) => Promise<string>);
    [k: string]: any;
}

Type declaration

  • [k: string]: any
  • Optional lstat?: ((path: string) => Promise<Stats>)
      • (path: string): Promise<Stats>
      • Parameters

        • path: string

        Returns Promise<Stats>

  • Optional readdir?: ((path: string, options: {
        withFileTypes: true;
    }) => Promise<Dirent[]>)
      • (path: string, options: {
            withFileTypes: true;
        }): Promise<Dirent[]>
      • Parameters

        • path: string
        • options: {
              withFileTypes: true;
          }
          • withFileTypes: true

        Returns Promise<Dirent[]>

  • Optional readlink?: ((path: string) => Promise<string>)
      • (path: string): Promise<string>
      • Parameters

        • path: string

        Returns Promise<string>

  • Optional realpath?: ((path: string) => Promise<string>)
      • (path: string): Promise<string>
      • Parameters

        • path: string

        Returns Promise<string>

readdir?: ((path: string, options: {
    withFileTypes: true;
}, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)) => void)

Type declaration

    • (path: string, options: {
          withFileTypes: true;
      }, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)): void
    • Parameters

      • path: string
      • options: {
            withFileTypes: true;
        }
        • withFileTypes: true
      • cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)
          • (er: null | ErrnoException, entries?: Dirent[]): any
          • Parameters

            • er: null | ErrnoException
            • Optional entries: Dirent[]

            Returns any

      Returns void

readdirSync?: ((path: string, options: {
    withFileTypes: true;
}) => Dirent[])

Type declaration

    • (path: string, options: {
          withFileTypes: true;
      }): Dirent[]
    • Parameters

      • path: string
      • options: {
            withFileTypes: true;
        }
        • withFileTypes: true

      Returns Dirent[]

readlinkSync?: ((path: string) => string)

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

realpathSync?: ((path: string) => string)

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

Generated using TypeDoc