• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/io/filesystementry.php
  • Класс: BitrixMainIOFileSystemEntry
  • Вызов: FileSystemEntry::isSystem
public function isSystem()
{
	if (preg_match("#/\.#", $this->path))
		return true;

	$documentRoot = static::getDocumentRoot($this->siteId);

	if (mb_substr($this->path, 0, mb_strlen($documentRoot)) === $documentRoot)
	{
		$relativePath = mb_substr($this->path, mb_strlen($documentRoot));
		$relativePath = ltrim($relativePath, "/");
		if (($pos = mb_strpos($relativePath, "/")) !== false)
			$s = mb_substr($relativePath, 0, $pos);
		else
			$s = $relativePath;
		$s = mb_strtolower(rtrim($s, "."));

		$ar = array(
			"bitrix" => 1,
			MainConfigOption::get("main", "upload_dir", "upload") => 1,
			"local" => 1,
			"urlrewrite.php" => 1,
		);
		if (isset($ar[$s]))
			return true;
	}

	return false;
}