• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/csv_data.php
  • Класс: CCSVData
  • Вызов: CCSVData::SetPos
public function SetPos($iCurPos = 0)
{
	if (!$this->__file)
	{
		return;
	}

	$iCurPos = intval($iCurPos);
	if ($iCurPos <= $this->iFileLength)
	{
		$this->iCurPos = $iCurPos;
	}
	else
	{
		$this->iCurPos = $this->iFileLength;
	}

	$pos = $this->iCurPos;
	if($this->__hasBOM)
	{
		$pos += 3;
	}
	fseek($this->__file, $pos);

	if(feof($this->__file))
	{
		$this->__buffer = "";
	}
	else
	{
		$this->__buffer = fread($this->__file, 1024*1024);
	}
	$this->__buffer_size = strlen($this->__buffer);
	$this->__buffer_pos = 0;
}