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

	if ($this->_bCompress)
	{
		$this->_dFile = @gzopen($this->io->GetPhysicalName($this->_strArchiveName), "wb9f");
	}
	else
	{
		$this->_dFile = @fopen($this->io->GetPhysicalName($this->_strArchiveName), "wb");
	}

	if (!($this->_dFile))
	{
		$this->_arErrors[] = ["ERR_OPEN_WRITE", str_replace("#FILE_NAME#", removeDocRoot($this->_strArchiveName), GetMessage("MAIN_ARCHIVE_ERR_OPEN_WRITE"))];
		return false;
	}
	return true;
}