Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function readdirSync
import { readdirSync } from "https://deno.land/std@0.100.0/node/_fs/_fs_readdir.ts";

Parameters

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

Parameters

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

Returns

string[]

Parameters

path: string | URL
optional
options: readDirOptions

Returns

Array<string | Dirent>