list-directories
List all directories in a given directory
const listDirectories = ; /* ./my-dir/a: file ./my-dir/b: directory ./my-dir/c: symlink to a directory ./my-dir/d: directory*/ async { await ; /* => Set { '/Users/example/my-dir/b', '/Users/example/my-dir/d' } */};
Installation
npm install list-directories
API
const listDirectories = ;
listDirectories(dir)
dir: string
Buffer
URL
(directory path)
options: Object
(readdir-sorted
options)
Return: Promise<Set<string>>
The promise will be fulfilled with a Set
of strings — absolute paths of all directories included in the given directory.
Options are directly passed to the underlying readdir-sorted
to control the order of results.
; ;
License
ISC License © 2018 Shinnosuke Watanabe