• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/zip.php
  • Класс: CZip
  • Вызов: CZip::_checkFormat
private function _checkFormat()
{
	$this->_errorReset();

	if (!is_file($this->io->GetPhysicalName($this->zipname)))
	{
		$this->_errorLog("ERR_MISSING_FILE", str_replace("#FILE_NAME#", removeDocRoot($this->zipname), GetMessage("MAIN_ZIP_ERR_MISSING_FILE")));
		return (false);
	}

	if (!is_readable($this->io->GetPhysicalName($this->zipname)))
	{
		$this->_errorLog("ERR_READ", str_replace("#FILE_NAME#", removeDocRoot($this->zipname), GetMessage("MAIN_ZIP_ERR_READ")));
		return (false);
	}

	//possible checks: magic code, central header, each file header
	return true;
}