• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/io/csvfile.php
  • Класс: BitrixTranslateIOCsvFile
  • Вызов: CsvFile::openWrite
public function openWrite(string $mode = MainIOFileStreamOpenMode::WRITE): bool 
{
	$this->open($mode);

	if (is_resource($this->filePointer))
	{
		if ($mode === MainIOFileStreamOpenMode::WRITE)
		{
			$this->fileSize = 0;
			if ($this->hasBom)
			{
				$this->fileSize = $this->write($this->bomMark);
			}
		}
		else
		{
			$this->fileSize = $this->getSize();
		}

		return true;
	}

	return false;
}