code: func (a *aggregator) popOldEventsTo(to map[string]*aggregatedEvent, dir *eventDir, dirPath string, currTime time.Time, delayRem bool) {
  	for childName, childDir := range dir.dirs {
  		a.popOldEventsTo(to, childDir, filepath.Join(dirPath, childName), currTime, delayRem)
  		if childDir.childCount() == 0 {
  			delete(dir.dirs, childName)
  		}
  	}
  	for name, event := range dir.events {
  		if a.isOld(event, currTime, delayRem) {
  			to[filepath.Join(dirPath, name)] = event
  			delete(dir.events, name)
  			a.counts[event.evType]--
  		}
  	}
  }
docs: // popOldEvents finds events that should be scheduled for scanning recursively in dirs,
  // removes those events and empty eventDirs and returns a map with all the removed
  // events referenced by their filesystem path