• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/backup.php
  • Класс: CTar
  • Вызов: CTar::readBlock
function readBlock($bIgnoreOpenNextError = false)
{
	if (!$this->Buffer)
	{
		$str = $this->gzip ? gzread($this->res, $this->BufferSize) : fread($this->res, $this->BufferSize);
		if ($str === '' && $this->openNext($bIgnoreOpenNextError))
			$str = $this->gzip ? gzread($this->res, $this->BufferSize) : fread($this->res, $this->BufferSize);
		if ($str !== '' && $key = $this->getEncryptKey())
			$str = self::decrypt($str, $key);
		$this->Buffer = $str;
	}

	$str = '';
	if ($this->Buffer)
	{
		$str = substr($this->Buffer, 0, 512);
		$this->Buffer = substr($this->Buffer, 512);
		$this->Block++;
	}

	return $str;
}