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