Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filepaths

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filepaths

Get paths to all files in dirs/subdirs

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

filepaths

Get paths to all files in dirs/subdirs in node

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

Keywords

FAQs

Package last updated on 24 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc