Sha256: 4af5fddf1a090eda2db54afb3e955d6c1b411c2697bac53675894f227784f8e1

Contents?: true

Size: 635 Bytes

Versions: 21

Compression:

Stored size: 635 Bytes

Contents

var spawn = require('child_process').spawn;

var find = spawn('find',[process.argv[2]||'./']);

var fs = require('fs');

var buf = '',count = 0;

handleBuf = function(data){

	buf += data;

	if(buf.length >= 1024) {
		var lines = buf.split("\n");
		buf = lines.pop();//last line my not be complete
		count += lines.length;
		process.stdout.write(lines.join("\n")+"\n");
	}
};

find.stdout.on('data',function(data){
	//buf += data.toString();
	handleBuf(data)
	//process.stdout.write(data.toString());
});

find.on('end',function(){
	handleBuf("\n");
	console.log('found '+count+' files');
	console.log('ended');
});

find.stdin.end();

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ela-4.1.6 node_modules/walkdir/test/comparison/find.js
ela-4.1.5 node_modules/walkdir/test/comparison/find.js
ela-4.1.4 node_modules/walkdir/test/comparison/find.js
ela-4.1.3 node_modules/walkdir/test/comparison/find.js
ela-4.1.2 node_modules/walkdir/test/comparison/find.js
ela-4.1.1 node_modules/walkdir/test/comparison/find.js
ela-4.1.0 node_modules/walkdir/test/comparison/find.js
ela-4.0.0 node_modules/walkdir/test/comparison/find.js
ela-3.4.3 node_modules/walkdir/test/comparison/find.js
ela-3.4.2 node_modules/walkdir/test/comparison/find.js
ela-3.4.0 node_modules/walkdir/test/comparison/find.js
ela-3.3.1 node_modules/walkdir/test/comparison/find.js
ela-3.3.0 node_modules/walkdir/test/comparison/find.js
ela-3.2.0 node_modules/walkdir/test/comparison/find.js
ela-3.1.1 node_modules/walkdir/test/comparison/find.js
ela-3.1.0 node_modules/walkdir/test/comparison/find.js
ela-3.0.0 node_modules/walkdir/test/comparison/find.js
ela-2.0.0 node_modules/walkdir/test/comparison/find.js
ela-1.1.0 node_modules/walkdir/test/comparison/find.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/walkdir/test/comparison/find.js