Spec-Zone.ru › Deno 1

Deno.readDir

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.

function readDir(path: string | URL): AsyncIterable<DirEntry>;
readDir(path: string | URL): AsyncIterable<DirEntry>

Parameters

path: string | URL

Return Type

AsyncIterable<DirEntry>

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.readDir

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API