find-file-paths
v0.0.0
Published
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.
Downloads
1
Maintainers
Readme
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.