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.125.0/node/_fs/_fs_readdir.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>