return all the files available in a series of paths
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead of groundwater:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
example.js
index.js
package.json

README.md

Path Search

Return all the files available in a series of paths.

Install

npm i --save lib-pathsearch

Usage

var ps = require('lib-pathsearch');

// search for commands starting with 'a'
// within '/bin', '/usr/bin', and '/usr/local/bin'
ps('a', ['/bin','/usr/bin','/usr/local/bin'], function (err, res) {
  console.log(res);
});

// [ 
//   'a2p',
//   'a2p5.12',
//   'a2p5.16',
//   'addftinfo',
//   'afconvert',
//   'afhash',
//   'afida',
//   'afinfo',
//   'afmtodit',
//   'afplay',
//   'agentxtrap',
//   'agvtool',
//   'alias',
//   'allmemory',
//   'applesingle',
//   'appletviewer',
//   'apply',
//   'apr-1-config',
//   'apropos',
//   'apt',
//   'apu-1-config',
//   'ar',
//   'arch',
//   ...
// ]