• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/index/fileindex.php
  • Класс: BitrixTranslateIndexFileIndex
  • Вызов: FileIndex::createByFile
static function createByFile(MainIOFile $file)
{

	if (
		!$file instanceof MainIOFile ||
		!$file->isFile() ||
		!$file->isExists() ||
		($file->getExtension() != 'php')
	)
	{
		throw new MainArgumentException();
	}

	$file = (new static())
		->setPath($file->getPath());

	return $file;
}