Function readdir

  • Asynchronous readdir. Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.

    Parameters

    Returns void

  • Parameters

    • path: PathLike
    • options: {
          withFileTypes?: false;
      }
      • OptionalwithFileTypes?: false
    • cb: Callback<[string[]]>

    Returns void

  • Parameters

    • path: PathLike
    • options: {
          withFileTypes: true;
      }
      • withFileTypes: true
    • cb: Callback<[Dirent[]]>

    Returns void