nl_tokens: Find all files that match extension criteria
pl_tokens: function findFiles ( rootpath , patterns ) { logger . trace ( "inside findFiles()" ) ; var patterns = patterns || [ '**' ] ; if ( _ . isString ( patterns ) ) { patterns = [ patterns ] ; } var files = _ . map ( wrench . readdirSyncRecursive ( rootpath ) , function ( filename ) { return path . posix . sep + replaceBackSlashes ( filename ) ; } ) ; var matchedFiles = match ( <mask> , patterns , { nocase : true , matchBase : true , dot : true , } ) ; return _ . filter ( matchedFiles , function ( file ) { return ! fs . statSync ( path . join ( rootpath , file ) ) . isDirectory ( ) ; } ) || [ ] ; }