public function getParentDirectories()
    {
        if ($this->isCurrentDirectoryBase()) {
            return [];
        }

        $currentDir = $this->currentDir;
        $dirs = [];
        do {
            $dir = dirname($currentDir);
            $dirs[] = $this->getPathRelativeToBaseDir($dir)
                ?: DIRECTORY_SEPARATOR;
            $currentDir = $dir;
        } while ($dir !== $this->baseDir);

        return array_reverse($dirs);
    }
public function getParentDirectories()
    {
        if ($this->isCurrentDirectoryBase()) {
            return [];
        }

        $currentDir = $this->currentDir;
        $dirs = [];
        do {
            $dir = dirname($currentDir);
            $dirs[] = $this->getPathRelativeToBaseDir($dir)
                ?: DIRECTORY_SEPARATOR;
            $currentDir = $dir;
        } while ($dir !== $this->baseDir);

        return array_reverse($dirs);
    }
public function getParentDirectories ( ) { if ( $ this -> isCurrentDirectoryBase ( ) ) { return [ ] ; } $ currentDir = $ this -> currentDir ; $ dirs = [ ] ; do { $ dir = dirname ( $ currentDir ) ; $ dirs [ ] = $ this -> getPathRelativeToBaseDir ( $ dir ) ? : DIRECTORY_SEPARATOR ; $ currentDir = $ dir ; } while ( $ dir !== $ this -> baseDir ) ; return array_reverse ( $ dirs ) ; }
Returns parent directories of current directory.

@return array
Returns parent directories of current directory .