ufinder
v0.0.5
Published
Recursive finder for files & directories with asynchronously supported and user defined filters
Downloads
5
Maintainers
Readme
ufinder
Recursive finder for files & directories with asynchronously supported and user defined filters
Command Line
Install
$ npm install -g ufinder
Usage
$ ufind -h
Usage: ufind [options]
Options:
-h, --help output usage information
-V, --version output the version number
-p, --path [path] Input search directory
-r, --recursive Recursive
-o, --output [file] Output file
-j, --json Output JSON format
-s, --skipFile Skip file
-i, --includeFile File include filter
-e, --excludeFile File exclude filter
-S, --skipDir Skip directory
-I, --includeDir Directory exclude filter
-E, --excludeDile Directory exclude filter
Library
Install
$ npm install --save ufinder
Usage
options
var Finder = require('ufinder')
;
var finder = new Finder({
recursive:true, //recursive folders
skipFile:false, //skip record file
skipDir:true, //skip record directory
includeFile:'*.js', //file include filter
excludeFile:'u*', //file exclude filter
includeDir:'*', //directory include filter
excludeDir:'node_*' //directory exclude filter
});
async
finder.find('', function(err, datas){
if (err) {
console.error(err);
} else {
console.log(datas);
}
})
sync
try {
var r = finder.findSync('');
console.log(r);
}catch(err){
console.error(err);
}
License
Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE file.