node-filepaths

0.1.0 • Public • Published

node-filepaths

Get paths to all files in dirs/subdirs

Build Status

getSync(paths, [opts])

Recurses through the supplied paths, returning an array of file paths found in each. Paths may be a string, or an array of strings. The paths may be strings pointing to files or directories. Accepts an options object with the following keys: ignore and ext. opts.ignore takes either a single string pattern or array of patterns to ignore. opts.ext accepts either a string, or array of strings corresponding to filename extensions to retrieve.

var filepaths = require('filepaths');
 
filepaths.getSync('/dir');
 
filePaths.getSync('/lib', {ext: '.js'});
 
filePaths.getSync('/project', {ignore: 'node_modules'});
 
filePaths.getSync('/project', {ignore: 'test|spec'});
 
filepaths.getSync(['/dir1', '/dir2'], {
  ext:    ['.js', '.jsx'],
  ignore: ['node_modules']
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    326
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    326
  • 0.0.3
    30
  • 0.0.2
    198
  • 0.0.1
    0

Package Sidebar

Install

npm i node-filepaths

Weekly Downloads

554

Version

0.1.0

License

MIT

Last publish

Collaborators

  • danielstjules