Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback

πŸ“ Recursive Readdir

Recursively read a directory in Deno.

Test CI

import { recursiveReaddir } from "";

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 "";
import { join, extname } from "";

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

πŸ‘©β€πŸ’» Development

Run tests:

deno test --allow-read

πŸ“„ License

MIT Β© Denorg