public function findFolders(string $pattern, int $flags = 0): FolderCollection
    {
        $folders = glob($this->path.'/'.$pattern, $flags);
        foreach ($folders as $index => $folder) {
            if (is_dir($folder)) {
                $folders[$index] = new self($folder);
            } else {
                unset($folders[$index]);
            }
        }

        return new FolderCollection($folders);
    }