ls-stat

1.0.1 • Public • Published

Directory iterator (with stats)

Simple sequential/serial folder iterator with promises

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']
});

/ls-stat/

    Package Sidebar

    Install

    npm i ls-stat

    Weekly Downloads

    9

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • wdalmut