UNPKG

walkdir

Version:

Find files simply. Walks a directory tree emitting events based on what it finds. Presents a familiar callback/emitter/a+sync interface. Walk a tree of any depth.

16 lines (7 loc) 236 B
var findit = require('findit'); var files = findit.findSync(process.argv[2]||'./'); var count = files.length; console.log(files); files = files.join("\n"); process.stdout.write(files+"\n"); console.log('found '+count+' files');