Options
All
  • Public
  • Public/Protected
  • All
Menu

A class representing a directory stream.

Hierarchy

  • Dir

Index

Properties

path

path: string

Methods

[Symbol.asyncIterator]

  • Asynchronously iterates over the directory via readdir(3) until all entries have been read.

    Returns AsyncIterableIterator<Dirent>

close

  • Asynchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

    Returns Promise<void>

  • Parameters

    Returns void

closeSync

  • closeSync(): void
  • Synchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

    Returns void

read

  • read(): Promise<Dirent | null>
  • read(cb: function): void
  • Asynchronously read the next directory entry via readdir(3) as an Dirent. After the read is completed, a value is returned that will be resolved with an Dirent, or null if there are no more directory entries to read. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

    Returns Promise<Dirent | null>

  • Parameters

    Returns void

readSync

  • Synchronously read the next directory entry via readdir(3) as a Dirent. If there are no more directory entries to read, null will be returned. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

    Returns Dirent | null

Generated using TypeDoc