/**
  * Filters directories that are about to be added.
  *
  * Internally, `buildFromDirectory()` calls `buildFromIterator()`. This
  * means that this event will only perform a quick check against the path
  * of the directory itself, while `buildFromIterator()` will perform a more
  * thorough check against each entry returned by the iterator.
  *
  * @param PreBuildFromDirectoryEvent $event The event arguments.
  */
 public function onBuildFromDirectory(PreBuildFromDirectoryEvent $event)
 {
     if (!$this->isAllowed($event->getPath(), true)) {
         $event->skip();
     }
 }