• Модуль: documentgenerator
  • Путь к файлу: ~/bitrix/modules/documentgenerator/lib/storage/file.php
  • Класс: BitrixDocumentGeneratorStorageFile
  • Вызов: File::delete
public function delete($path)
{
	$file = new IOFile($path);
	if($file->isExists())
	{
		return $file->delete();
	}

	if(Loader::includeModule('clouds'))
	{
		$cloudPath = CCloudStorage::FindFileURIByURN($path, Driver::MODULE_ID);
		if(!empty($cloudPath))
		{
			$bucket = CCloudStorage::FindBucketByFile($cloudPath);
			$bucket->DeleteFile($path);
		}
	}

	return true;
}