Ende.readDir

function ยท requires --allow-read

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

Reads the directory given by path and returns an async iterable of Ende.DirEntry. The order of entries is not guaranteed.

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

Throws error if path is not a directory.

Requires allow-read permission.