f-d-wishlist
v0.0.0
Published
list top-level entries in a directory
Downloads
3
Readme
f-d-wishlist
Get a list of top-level files and directories within some parent directory. Optionally get full paths instantly.
Get it!
npm install f-d-wishlist
Usage
wishlist(dir[, opts], callback)
Options default to:
{
full: false, // get full paths?
dereference: false // follow symlinks?
}
Callback has signature callback(err, list)
. The list is an object, see below.
var wishlist = require('f-d-wishlist')
wishlist('.', function (err, list) {
if (err) return console.error(err)
console.log(list) // -> { dirs: [/*...*/], files: [/*.*/] }
})