• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/storage.php
  • Класс: BitrixDiskStorage
  • Вызов: Storage::addBlankFile
public function addBlankFile(array $data, array $rights = array(), $generateUniqueName = false)
{
	$this->errorCollection->clear();

	$rootFolder = $this->getRootObject();
	if(!$rootFolder)
	{
		$this->errorCollection->add(array(new Error("Storage doesn't have root folder.", self::ERROR_NOT_EXISTS_ROOT_OBJECT)));

		return null;
	}
	$fileModel = $rootFolder->addBlankFile($data, $rights, $generateUniqueName);
	if(!$fileModel)
	{
		$this->errorCollection->add($rootFolder->getErrors());

		return null;
	}

	return $fileModel;
}