find-file

Search for a file in an array of paths

MIT 7 个版本
安装
npm install find-file
yarn add find-file
pnpm add find-file
bun add find-file
README

find-file Build Status

Search for a file in an array of paths

Install

$ npm install --save find-file

Usage

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

License

MIT © Kevin Mårtensson

版本列表
1.0.1 2014-09-02
1.0.0 2014-09-01
0.1.4 2014-03-27
0.1.3 2014-03-27
0.1.2 2014-03-05
0.1.1 2014-02-24
0.1.0 2014-02-05