• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/snippets.php
  • Класс: CSnippets
  • Вызов: CSnippets::RemoveCategory
static function RemoveCategory($params)
{
	$res = false;
	if (is_array($params) && isset($params['path']))
	{
		$path = CFileMan::SecurePathVar($params['path']);
		$template = (isset($params['template']) && $params['template'] !== '') ? CFileMan::SecurePathVar($params['template']) : '.default';
		$basePath = self::GetBasePath($template);
		$categoryPath = $basePath.'/'.$path;

		$io = CBXVirtualIo::GetInstance();
		if($io->DirectoryExists($categoryPath))
		{
			$res = $io->Delete($categoryPath);
		}

		CSnippets::ClearCache();
	}
	return $res;
}