findittest.js 259 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 var findit = require('findit'); var find = findit.find(process.argv[2]||'./'); var count = 0; find.on('file',function(path,stat){ count++; process.stdout.write(path+"\n"); }); find.on('end',function(){ console.log('found '+count+' regular files'); });