Skip to main content
opendirSync - fs - Node documentation
function opendirSync

Usage in Deno

import { opendirSync } from "node:fs";
opendirSync(
path: PathLike,
options?: OpenDirOptions,
): Dir

Synchronously open a directory. See opendir(3).

Creates an fs.Dir, which contains all further functions for reading from and cleaning up the directory.

The encoding option sets the encoding for the path while opening the directory and subsequent read operations.

Parameters

path: PathLike
optional
options: OpenDirOptions

Return Type