Skip to main content
Module

x/netzo/deno.d.ts>Deno.readDirSync

SDK for Netzo, the open Web platform to unify IoT devices, applications and services.
Go to Latest
function Deno.readDirSync
allow-read
import { Deno } from "https://deno.land/x/netzo@v0.1.10/deno.d.ts";
const { readDirSync } = Deno;

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.

Parameters

path: string | URL

Returns

Iterable<DirEntry>