Function readdir

  • Asynchronous readdir(3) - read a directory.

    Note: The order of entries is not guaranteed

    Parameters

    • this: V_Context
    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • Optionaloptions: NullEnc | ReaddirOptsI<{ withFileTypes?: false }>

      The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8'.

    Returns Promise<string[]>

  • Asynchronous readdir(3) - read a directory.

    Note: The order of entries is not guaranteed

    Parameters

    • this: V_Context
    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • options: BufferEncodingOption & ReaddirOptions & { withFileTypes?: false }

      The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8'.

    Returns Promise<Buffer[]>

  • Asynchronous readdir(3) - read a directory.

    Note: The order of entries is not guaranteed

    Parameters

    • this: V_Context
    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • Optionaloptions: NullEnc | ReaddirOptsI<{ withFileTypes?: false }>

      The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8'.

    Returns Promise<string[] | Buffer[]>

  • Asynchronous readdir(3) - read a directory.

    Note: The order of entries is not guaranteed

    Parameters

    • this: V_Context
    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • options: ReaddirOptsI<{ withFileTypes: true }>

      The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8'.

    Returns Promise<Dirent[]>

  • Asynchronous readdir(3) - read a directory.

    Note: The order of entries is not guaranteed

    Parameters

    • this: V_Context
    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • Optionaloptions:
          | null
          | "ascii"
          | "utf8"
          | "utf-8"
          | "utf16le"
          | "utf-16le"
          | "ucs2"
          | "ucs-2"
          | "base64"
          | "base64url"
          | "latin1"
          | "binary"
          | "hex"
          | ReaddirOptions & ObjectEncodingOptions
          | ReaddirOptions & "buffer"
          | ReaddirOptions & { encoding: "buffer" }

      The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8'.

    Returns Promise<string[] | Dirent[] | Buffer[]>