- readdir(path, options?): Promise<string[]>
Parameters
- path: PathLike
Optional
options: null | BufferEncoding | ObjectEncodingOptions & ReaddirOptions & {
withFileTypes?: false;
}
Returns Promise<string[]>
- readdir(path, options): Promise<Buffer[]>
Parameters
- path: PathLike
- options: BufferEncodingOption & ReaddirOptions & {
withFileTypes?: false;
}
Returns Promise<Buffer[]>
- readdir(path, options?): Promise<string[] | Buffer[]>
Parameters
- path: PathLike
Optional
options: null | BufferEncoding | ObjectEncodingOptions & ReaddirOptions & {
withFileTypes?: false;
}
Returns Promise<string[] | Buffer[]>
- readdir(path, options): Promise<Dirent[]>
Parameters
- path: PathLike
- options: ObjectEncodingOptions & ReaddirOptions & {
withFileTypes: true;
}
Returns Promise<Dirent[]>
- readdir(path, options?): Promise<string[] | Dirent[] | Buffer[]>
Parameters
- path: PathLike
Optional
options: null | BufferEncoding | (ReaddirOptions & (ObjectEncodingOptions | BufferEncodingOption))
Returns Promise<string[] | Dirent[] | Buffer[]>
Asynchronous readdir(3) - read a directory.
Note: The order of entries is not guaranteed