Spec-Zone.ru › Deno 1

Deno.readDirSync

Synchronously reads the directory given by path and returns an iterable of Deno.DirEntry.

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

Throws error if path is not a directory.

Requires allow-read permission.

function readDirSync(path: string | URL): Iterable<DirEntry>;
readDirSync(path: string | URL): Iterable<DirEntry>

Parameters

path: string | URL

Return Type

Iterable<DirEntry>

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

Spec-Zone.ru

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