• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/backup.php
  • Класс: CTar
  • Вызов: CTar::writeBlock
function writeBlock($str)
{
	$l = strlen($str);
	if ($l!=512)
		return $this->Error('Wrong block size: '.$l);

	if ($this->ArchiveSizeCurrent >= $this->ArchiveSizeLimit)
	{
		$file = $this->getNextName();
		$this->close();

		if (!$this->open($file,$this->mode))
			return false;

		$this->ArchiveSizeCurrent = 0;
	}

	$this->Buffer .= $str;

	$this->Block++;
	$this->ArchiveSizeCurrent += 512;

	if (strlen($this->Buffer) == $this->BufferSize)
		return $this->flushBuffer();

	return true;
}