Socket
Book a DemoInstallSign in
Socket

find-file-paths

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-file-paths

Small utility to recursively search for files based on an array of search & exclude patterns which returns an array of absolute paths for the files found.

0.0.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

find-file-paths

Small utility to recursively search for files based on an array of search & exclude patterns which returns an array of absolute paths for the files found.

Install

npm install find-file-paths

Usage

findPaths = require 'find-file-paths'

startDir = process.cwd() + '/test'

greedy = true

searchPatterns = [
  'ui-tests/'         # Matches all files in "#{startDir}/ui-tests/*"
  'load-tests/login'  # Matches all files in "#{startDir}/load-tests/login*"
  '*smoke*'           # Matches all files in "#{startDir}/*" with "smoke" in the name
]

excludePatterns = [
  'unit/'     # Excludes all files in "#{startDir}/unit/*"
  '*.broken'  # Excludes all files with ".broken" in the name
]

allAbsoluteFilePaths = findPaths searchPatterns, excludePatterns, greedy, startDir

More detailed parameter explanations can be found in the code.

Keywords

find-file-paths

FAQs

Package last updated on 05 Jun 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.