Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Search for a file in an array of paths
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

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

Something went wrong with that request. Please try again.