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
- Host: GitHub
- URL: https://github.com/wdalmut/ls-stat
- Owner: wdalmut
- Created: 2017-03-05T21:21:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T19:36:14.000Z (about 8 years ago)
- Last Synced: 2025-02-26T06:35:59.605Z (about 2 months ago)
- Topics: ls, lstat, stat
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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']
});
```