Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denorg/recursive-readdir
📁 Recursively read directories in Deno
https://github.com/denorg/recursive-readdir
deno denoland deonrg fs readdir recursion typescript
Last synced: 3 days ago
JSON representation
📁 Recursively read directories in Deno
- Host: GitHub
- URL: https://github.com/denorg/recursive-readdir
- Owner: denorg
- License: mit
- Created: 2020-05-14T12:59:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T11:53:00.000Z (over 4 years ago)
- Last Synced: 2024-04-27T05:35:21.811Z (10 months ago)
- Topics: deno, denoland, deonrg, fs, readdir, recursion, typescript
- Language: TypeScript
- Homepage: https://denorg.github.io/recursive-readdir/
- Size: 22.5 KB
- Stars: 10
- Watchers: 7
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno-cn - @denorg/recursive-readdir
- awesome-deno - recursive-readdir - Recursively read directories in Deno. (Modules / Online Playgrounds)
- awesome-deno - recursive-readdir - Recursively read directories in Deno. (Modules / Utils)
README
# 📁 Recursive Readdir
Recursively read a directory in Deno.
[](https://github.com/denorg/recursive-readdir/actions)
[](https://github.com/denorg/recursive-readdir/blob/master/LICENSE)
[](https://github.com/denorg/recursive-readdir/graphs/contributors)
[](https://denorg.github.io/starter/)
[](https://github.com/denorg)
[](https://github.com/denorg/recursive-readdir)
[](https://github.com/semantic-release/semantic-release)```ts
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:
```ts
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:
```bash
deno test --allow-read
```## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →