An open API service indexing awesome lists of open source software.

https://github.com/wdalmut/ls-stat

Simple ls with promises
https://github.com/wdalmut/ls-stat

ls lstat stat

Last synced: about 1 month ago
JSON representation

Simple ls with promises

Awesome Lists containing this project

README

        

# Directory iterator (with stats)

Simple sequential/serial folder iterator with promises

```js
const ls = require('ls-stat');

ls('/path/to/disk').then((files) => {
// ['folder1', 'folder2', 'file.txt', 'file2.txt'] (stats included)
var paths = files.filter((file) => file.isDirectory()).map((file) => file.filename);

console.log(paths); // ['folder1', 'folder2']
});
```