• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/backup.php
  • Класс: CTar
  • Вызов: CTar::Skip
function Skip($Block)
{
	if ($Block == 0)
		return true;

	$this->Block += $Block;
	$toSkip = $Block * 512;

	if (strlen($this->Buffer) > $toSkip)
	{
		$this->Buffer = substr($this->Buffer, $toSkip);
		return true;
	}
	$this->Buffer = '';
	$NewPos = $this->Block * 512;

	if ($ArchiveSize = $this->getDataSize($file = self::getFirstName($this->file)))
	{
		while($NewPos > $ArchiveSize)
		{
			$file = $this->getNextName($file);
			$NewPos -= $ArchiveSize;
		}
	}

	if ($file != $this->file)
	{
		$this->close();
		if (!$this->open($file, $this->mode))
			return false;
	}

	if (0 === ($this->gzip ? gzseek($this->res, $NewPos) : fseek($this->res, $NewPos)))
		return true;
	return $this->Error('File seek error (file: '.$this->file.', position: '.$NewPos.')');
}