blob: 590f9d1bef33a2129b14d7fdbffa6525fb14da97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
var lsr = require('ls-r');
lsr(process.argv[2]||'./',{maxDepth:500000,recursive:true},function(err,origPath,args){
if(err) {
console.log('eww an error! ',err);
return;
}
//console.log('hit');
var c = 0;
args.forEach(function(stat){
if(stat.isFile()){
console.log(stat.path);
c++;
}
});
console.log('found '+args.length+" regular files");
});
|