Checks whether a given root path is a site root.<p>

@param rootPath a root path

@return true if the given path is the path of a site root
555816
public boolean isSiteRoot(String rootPath) {

        String siteRoot = getSiteRoot(rootPath);
        rootPath = CmsStringUtil.joinPaths(rootPath, "/");
        return rootPath.equals(siteRoot);

    }
383485
public static boolean isDirectoryPath(URI path) {
    return (path != null) && path.toString().endsWith(GoogleCloudStorage.PATH_DELIMITER);
  }
1110840
public static boolean isDirectory(Path path, boolean isFollowLinks) {
		if (null == path) {
			return false;
		}
		final LinkOption[] options = isFollowLinks ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS };
		return Files.isDirectory(path, options);
	}
678360
boolean isRootRequest(HttpServletRequest request) {
        String path = request.getPathInfo();
        if (StringUtils.isBlank(path)) {
            return true;
        } else if (StringUtils.equals("/", path)) {
            return true;
        }
        return false;
    }
873148
public static boolean isPluginResoucePath(String resourcePath) {

		Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(resourcePath);
		return matcher.find();
	}
663043
private boolean startsWithCustomRoot(String path) {
		for (Enumeration<String> it = customRoots.elements(); it != null
				&& it.hasMoreElements();) {
			if (path.startsWith(it.nextElement())) {
				return true;
			}
		}
		return false;
	}
791256
private boolean isSymlink(File base, String path) {
        return isSymlink(base, SelectorUtils.tokenizePath(path));
    }
503781
private boolean isValidEntryAndPath(CmsClientSitemapEntry entry, String toPath) {

        return ((toPath != null)
            && (CmsResource.getParentFolder(toPath) != null)
            && (entry != null)
            && (getEntry(CmsResource.getParentFolder(toPath)) != null)
            && (getEntry(entry.getSitePath()) != null));
    }
348900
public String getParentFolderType(String rootPath) {

        String parent = CmsResource.getParentFolder(rootPath);
        if (parent == null) {
            return null;
        }
        String type = m_folderTypes.get(parent);
        // type may be null
        return type;
    }
1083854
protected boolean isAliasBelowBaseFolder(CmsAlias alias) {

        boolean isBelowBaseFolder = CmsStringUtil.isPrefixPath(m_baseFolderSitePath, alias.getAliasPath());
        return isBelowBaseFolder;
    }
225931
protected boolean isSitePathValid() {

        try {
            CmsObject cmsLocal = OpenCms.initCmsObject(m_cms);
            cmsLocal.getRequestContext().setSiteRoot((String)m_site.getValue());
            if (m_startfolder.getValue().length() <= ((String)m_site.getValue()).length()) {
                return false;
            }
            return cmsLocal.existsResource(m_startfolder.getValue().substring(((String)m_site.getValue()).length()));
        } catch (CmsException e) {
            LOG.error("Unabel to ini CmsObject", e);
            return false;
        }
    }
543737
def _is_under_root(self, full_path):
        """"""
        if (path.abspath(full_path) + path.sep)\
                .startswith(path.abspath(self.root) + path.sep):
            return True
        else:
            return False
1292014
public static ArrayList<Element> verifyPath( Element root, ArrayList<Element> path )
	{
		if( root == path.get( 0 ) )
			return path;
		return null;
	}
160367
public static PathSelector subpathSelector(final Path rootPath) {
        return new PathSelector() {
            @Override
            public boolean matchesPath(Path path) {
                return path.equals(rootPath) || PathUtil.hasRoot(path, rootPath);
            }
        };
    }
201683
public boolean hasPath(String path) {
        Props props = pathMap.get(path);
        return props != null && !props.isEmpty();
    }
600230
public function checkRootPath($rootpath){
        /* 设置根目录 */
        $this->rootPath = ftp_pwd($this->link) . '/' . ltrim($rootpath, '/');

        if(!@ftp_chdir($this->link, $this->rootPath)){
            $this->error = '上传根目录不存在！';
            return false;
        }
        return true;
    }
1224594
public void changeSite(String siteRoot, String path, boolean force) {

        CmsObject cms = A_CmsUI.getCmsObject();
        String currentSiteRoot = cms.getRequestContext().getSiteRoot();
        if (force || !currentSiteRoot.equals(siteRoot)) {
            CmsAppWorkplaceUi.get().changeSite(siteRoot);
            if (path == null) {
                path = m_locationCache.getFileExplorerLocation(siteRoot);
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(siteRoot)
                    && ((path == null) || !path.startsWith("/system"))) {
                    // switching to the root site and previous root site folder is not below /system
                    // -> stay in the current folder
                    path = m_locationCache.getFileExplorerLocation(currentSiteRoot);
                    if (path != null) {
                        path = CmsStringUtil.joinPaths(currentSiteRoot, path);
                    }
                }
            }
            openPath(path, true);
            Container container = m_siteSelector.getContainerDataSource();
            for (Object id : container.getItemIds()) {
                String key = (String)id;
                if (CmsStringUtil.comparePaths(key, siteRoot)) {
                    siteRoot = key;
                    break;
                }
            }
            m_siteSelector.select(siteRoot);
        }
    }