elFinder\elFinderVolumeLocalFileSystem::_subdirs PHP Method

_subdirs() protected method

Return true if path is dir and has at least one childs directory
Author: Dmitry (dio) Levashov
protected _subdirs ( string $path ) : boolean
$path string dir path
return boolean
    protected function _subdirs($path)
    {
        if ($dir = dir($path)) {
            $dir = dir($path);
            while (($entry = $dir->read()) !== false) {
                $p = $dir->path . DIRECTORY_SEPARATOR . $entry;
                if ($entry != '.' && $entry != '..' && is_dir($p) && !$this->attr($p, 'hidden')) {
                    $dir->close();
                    return true;
                }
            }
            $dir->close();
        }
        return false;
    }