• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/blankfiledata.php
  • Класс: Bitrix\Disk\Document\BlankFileData
  • Вызов: BlankFileData::__construct
public function __construct($type)
{
	parent::__construct();

	$type = trim(mb_strtolower($type), '.');
	if (!$this->issetType($type))
	{
		throw new SystemException("Could not find type '{$type}' in BlankFile");
	}

	$typeData = $this->getType($type);

	$this->name = $typeData['newFileName'] . $typeData['ext'];
	$this->mimeType = TypeFile::getMimeTypeByFilename($this->name);
	$this->src = $typeData['src'];
	$this->size = IO\File::isFileExists($typeData['src']) ? filesize($typeData['src']) : 0;
}