refactor(size) processDir: callback -> emitter