• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/io/csvfile.php
  • Класс: BitrixTranslateIOCsvFile
  • Вызов: CsvFile::setPos
public function setPos(int $position = 0): void
{
	if ($position <= $this->fileSize)
	{
		$this->currentPosition = $position;
	}
	else
	{
		$this->currentPosition = $this->fileSize;
	}

	$pos = $this->currentPosition;
	if($this->hasBom)
	{
		$pos += 3;
	}
	$this->seek($pos);

	$this->buffer = $this->read(1024 * 1024);

	$this->bufferSize = $this->getStringByteLength($this->buffer);
	$this->bufferPosition = 0;
}