• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/controller/baseobject.php
  • Класс: BitrixDiskControllerBaseObject
  • Вызов: BaseObject::deleteFile
protected function deleteFile(DiskFile $file)
{
	$securityContext = $file->getStorage()->getSecurityContext($this->getCurrentUser()->getId());
	if (!$file->canDelete($securityContext))
	{
		$this->errorCollection[] = new Error(Loc::getMessage('DISK_ERROR_MESSAGE_DENIED'));

		return;
	}

	if (!$file->delete($this->getCurrentUser()->getId()))
	{
		$this->errorCollection->add($file->getErrors());
	}
}