• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/cache_files_cleaner.php
  • Класс: _CFileTree
  • Вызов: _CFileTree::GoUp
function GoUp()
{
	$last_dir = self::ExtractFileFromPath($this->_path);
	//We are not going to go up any more
	if(mb_strlen($this->_path."/") < mb_strlen($this->_in_path))
		return false;

	$this->_dir = $this->ReadDir($this->_path);
	//This should't be happen so try to goup one more level
	if(!is_array($this->_dir))
		return $this->GoUp();

	//Skip all dirs till current
	while(count($this->_dir))
	{
		if(strcmp($this->_dir[0], $last_dir) > 0)
			break;
		array_shift($this->_dir);
	}

	if(!empty($this->_dir))
		return true; //there is more work to do
	else
		return $this->GoUp(); // try to go upper
}