PhpBench\Storage\Driver\Xml\HistoryIterator::getDirectoryIterator PHP Method

getDirectoryIterator() private method

We sort by date in descending order.
private getDirectoryIterator ( $path ) : ArrayIterator
return ArrayIterator
    private function getDirectoryIterator($path)
    {
        $nodes = new \DirectoryIterator($path);
        $dirs = [];
        foreach ($nodes as $dir) {
            if (!$dir->isDir()) {
                continue;
            }
            if ($dir->isDot()) {
                continue;
            }
            $dirs[hexdec($dir->getFilename())] = $dir->getPathname();
        }
        krsort($dirs);
        return new \ArrayIterator($dirs);
    }