Awesome
📁 Recursive Readdir
Recursively read a directory in Deno.
import { recursiveReaddir } from "https://deno.land/x/recursive_readdir/mod.ts";
const files = await recursiveReaddir("path/to/dir"); // string[]
Required permissions:
--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
<p align="center"> <a href="https://den.org.in"> <img width="100" alt="" src="https://raw.githubusercontent.com/denorg/denorg/master/logo.svg"> </a> </p> <p align="center"> <sub>A project by <a href="https://den.org.in">Denorg</a>, the world's first Deno-focused community<br>organization and consulting company. <a href="https://den.org.in">Work with us →</a></sub> </p>