Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/node/fs.ts>readdirSync

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function readdirSync
Re-export
import { readdirSync } from "https://deno.land/std@0.145.0/node/fs.ts";

Parameters

path: string | Buffer | URL
options: { withFileTypes: true; encoding?: string; }

Parameters

path: string | Buffer | URL
optional
options: { withFileTypes?: false; encoding?: string; }

Returns

string[]

Parameters

path: string | Buffer | URL
optional
options: readDirOptions

Returns

Array<string | Dirent>