Skip to content
/ ufinder Public

Recursive finder for files & directories with asynchronously supported and user defined filters

License

Notifications You must be signed in to change notification settings

jetiny/ufinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ufinder

NPM version Dependency Status devDependency Status

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.

About

Recursive finder for files & directories with asynchronously supported and user defined filters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published