Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/levo/templates/new-project/lib/lib.deno_runtime.d.ts>Deno.readDir

Server side rendering with The Elm Architecture in Deno
Latest
function Deno.readDir
import { Deno } from "https://deno.land/x/levo@v0.0.27/templates/new-project/lib/lib.deno_runtime.d.ts";
const { readDir } = Deno;

Reads the directory given by path and returns an async iterable of Deno.DirEntry.

for await (const dirEntry of Deno.readDir("/")) {
  console.log(dirEntry.name);
}

Throws error if path is not a directory.

Requires allow-read permission.

Parameters

path: string | URL

Returns

AsyncIterable<DirEntry>