protected function listSubDirs($dir)
    {
        $list = [];
        $handle = opendir($dir);
        if ($handle === false) {
            throw new InvalidParamException("Unable to open directory: $dir");
        }
        while (($file = readdir($handle)) !== false) {
            if ($file === '.' || $file === '..') {
                continue;
            }
            // ignore hidden directories
            if ($file[0] === '.') {
                continue;
            }
            if (is_dir("$dir/$file")) {
                $list[] = "$dir/$file";
            }
        }
        closedir($handle);
        return $list;
    }
protected function listSubDirs($dir)
    {
        $list = [];
        $handle = opendir($dir);
        if ($handle === false) {
            throw new InvalidParamException("Unable to open directory: $dir");
        }
        while (($file = readdir($handle)) !== false) {
            if ($file === '.' || $file === '..') {
                continue;
            }
            
            if ($file[0] === '.') {
                continue;
            }
            if (is_dir("$dir/$file")) {
                $list[] = "$dir/$file";
            }
        }
        closedir($handle);
        return $list;
    }
protected function listSubDirs ( $ dir ) { $ list = [ ] ; $ handle = opendir ( $ dir ) ; if ( $ handle === false ) { throw new InvalidParamException ( "Unable to open directory: $dir" ) ; } while ( ( $ file = readdir ( $ handle ) ) !== false ) { if ( $ file === '.' || $ file === '..' ) { continue ; } // ignore hidden directories if ( $ file [ 0 ] === '.' ) { continue ; } if ( is_dir ( "$dir/$file" ) ) { $ list [ ] = "$dir/$file" ; } } closedir ( $ handle ) ; return $ list ; }
Get a list of subdirectories for directory specified.
@param string $dir directory to read

@return array list of subdirectories
Get a list of subdirectories for directory specified . @param string $dir directory to read