• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/tar_gz.php
  • Класс: CArchiver
  • Вызов: CArchiver::addString
public function addString($strFilename, $strFileContent)
{
	$this->_arErrors = [];

	if (!file_exists($this->io->GetPhysicalName($this->_strArchiveName))
		|| !is_file($this->io->GetPhysicalName($this->_strArchiveName)))
	{
		if (!$this->_openWrite())
		{
			return false;
		}
		$this->_close();
	}

	if (!$this->_openAppend())
	{
		return false;
	}

	$res = $this->_addString($strFilename, $strFileContent);

	$this->_writeFooter();
	$this->_close();
	return $res;
}