@aegenet/belt-readdir
v2.3.0
Published
Get all files from a root directory (recursively)
Downloads
383
Readme
@aegenet/belt-readdir
Get all files from a root directory (recursively).
Node only!
💾 Installation
yarn add @aegenet/belt-readdir@^2.0.0
# or
npm i @aegenet/belt-readdir@^2.0.0
📝 Usage (Node.js)
import { readdir, IReaddirEntry } from '@aegenet/belt-readdir';
const files: IReaddirEntry[] = readdir('./');
// ['a/file.yml', 'x/y/z.yml']
const files: IReaddirEntry[] = await readdir('./', file => file.name.endsWith('.yml'));
// ['a/file.yml', 'x/y/z.yml']