Search for a file in an array of paths
$ npm install find-file
Search for a file in an array of paths
$ npm install --save find-file
var Find = require('find-file');
var find = new Find()
.name('foo.jpg')
.where(['./images', './media']);
find.run(function (err, files) {
if (err) {
throw err;
}
console.log(files);
//=> [{ path: 'images/foo.jpg', name: 'foo.jpg', ...}]
});
MIT © Kevin Mårtensson
© 2010 - cnpmjs.org x YWFE | Home | YWFE