code: public function dirs(?int $constraints = null): \Generator
      {
          foreach ($this->all($constraints) as $directory) {
              if ($directory->isDir()) {
                  yield $directory;
              }
          }
      }
docs: list only directories
  @param int|null $constraints
  @return Directory[]