• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/archive.php
  • Класс: CBXArchive
  • Вызов: CBXArchive::GetArchive
static function GetArchive($strArcName, $strType = "")
{
	//at first trying to detect the archive type
	if ($strType == "")
	{
		$strType = self::DetectTypeByFilename($strArcName);

		if (!$strType)
		{
			$strType = "TAR.GZ";
		}
	}

	$arFormats = self::GetAvailableFormats();

	foreach ($arFormats as $type => $data)
	{
		if ($strType == $type)
		{
			$object = new $data["classname"]($strArcName);
			return $object;
		}
	}

	return false;
}