refactor(size) emit: size -> file

This commit is contained in:
coderaiser 2014-11-19 07:16:34 -05:00
parent c96a57c310
commit 4debada2db

View file

@ -34,8 +34,8 @@
stopOnError = options.stopOnError;
}
emitter.on('size', function(size) {
total += size || 0;
emitter.on('file', function(file, stat) {
total += stat.size || 0;
});
emitter.on('error', function(error) {
@ -89,7 +89,7 @@
isDir = stat.isDirectory();
if (!isDir)
emitter.emit('size', stat.size);
emitter.emit('file', dir, stat);
else if (isDir) {
++asyncRunning;