• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/controller/file.php
  • Класс: BitrixDiskControllerFile
  • Вызов: File::getMetaDataForCreatedFileInUfAction
public function getMetaDataForCreatedFileInUfAction(DiskFile $file)
{
	if ($file->getCreatedBy() != $this->getCurrentUser()->getId())
	{
		return [];
	}

	$folder = $file->getParent();
	if (!$folder || $folder->getCode() !== DiskSpecificFolder::CODE_FOR_CREATED_FILES)
	{
		return [];
	}

	$storage = $file->getStorage();

	return [
		'id' => $file->getId(),
		'object' => [
			'id' => $file->getId(),
			'name' => $file->getName(),
			'sizeInt' => $file->getSize(),
			'size' => CFile::formatSize($file->getSize()),
			'extension' => $file->getExtension(),
			'nameWithoutExtension' => getFileNameWithoutExtension($file->getName()),
		],
		'folderName' => $storage->getProxyType()->getTitleForCurrentUser() . ' / ' . $folder->getName(),
	];
}