@denorg/recursive-readdir

2.0.0 • Public • Published

📁 Recursive Readdir

Recursively read a directory in Deno.

Test CI

import { recursiveReaddir } from "https://deno.land/x/recursive_readdir/mod.ts";

const files = await recursiveReaddir("path/to/dir"); // string[]

Required permissions:

  1. --allow-read

💡 Recipes

Search for all markdown files in the content folder:

import { recursiveReaddir } from "https://deno.land/x/recursive_readdir/mod.ts";
import { join, extname } from "https://deno.land/std/path/mod.ts";

const markdownFiles = (await recursiveReaddir(join(".", "content"))).filter(
  (file: string) => extname(file) === ".md"
);

👩‍💻 Development

Run tests:

deno test --allow-read

📄 License

MIT © Denorg

Dependents (0)

Package Sidebar

Install

npm i @denorg/recursive-readdir

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

6.28 kB

Total Files

11

Last publish

Collaborators

  • anandchowdhary