TempFile::removeActualTempFile

  1. Bitrix24 API (v. 23.675.0)
  2. ui
  3. TempFile
  4. removeActualTempFile
  • Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/FileUploader/TempFile.php
  • Класс: BitrixUIFileUploaderTempFile
  • Вызов: TempFile::removeActualTempFile
private function removeActualTempFile(): bool
{
	if ($this->getDeleted())
	{
		return true;
	}

	$success = false;
	if ($this->isCloud())
	{
		$bucket = $this->getBucket();
		if ($bucket)
		{
			$success = $bucket->deleteFile($this->getPath());
		}
	}
	else
	{
		$success = IOFile::deleteFile($this->getAbsolutePath());
	}

	if ($success)
	{
		$this->setDeleted(true);
		$this->save();
	}

	return $success;
}

Добавить комментарий