application/Espo/Core/Utils/File/Manager.php
protected function removeEmptyDirs($path)
    {
        $parentDirName = $this->getParentDirName($path);

        $res = true;
        if ($this->isDirEmpty($parentDirName)) {
            $res &= $this->rmdir($parentDirName);
            $res &= $this->removeEmptyDirs($parentDirName);
        }

        return (bool) $res;
    }
protected function removeEmptyDirs($path)
    {
        $parentDirName = $this->getParentDirName($path);

        $res = true;
        if ($this->isDirEmpty($parentDirName)) {
            $res &= $this->rmdir($parentDirName);
            $res &= $this->removeEmptyDirs($parentDirName);
        }

        return (bool) $res;
    }
protected function removeEmptyDirs ( $ path ) { $ parentDirName = $ this -> getParentDirName ( $ path ) ; $ res = true ; if ( $ this -> isDirEmpty ( $ parentDirName ) ) { $ res &= $ this -> rmdir ( $ parentDirName ) ; $ res &= $ this -> removeEmptyDirs ( $ parentDirName ) ; } return ( bool ) $ res ; }
Remove empty parent directories if they are empty
@param  string $path
@return bool
Remove empty parent directories if they are empty