Returns true if the path starts with the shared folder path.<p>

@param path the path to check

@return true if the path starts with the shared folder path
972706
public boolean startsWithShared(String path) {

        return (m_sharedFolder != null) && CmsFileUtil.addTrailingSeparator(path).startsWith(m_sharedFolder);
    }
1311819
public boolean isExcluded(String path) {

        path = normalizePath(path);
        List<String> pathList = new ArrayList<String>(m_allPaths);
        // m_allPaths is already sorted, we need the reverse ordering so children come before their parents
        // (we want to find the deepest parent folder of 'path' that is marked as include/exclude)
        Collections.reverse(pathList);
        for (String pathInList : pathList) {
            if (CmsStringUtil.isPrefixPath(pathInList, path)) {
                return m_excludes.contains(pathInList);
            }
        }
        return false;
    }
400567
protected boolean isInTargets(String path) {

        for (CmsPair<String, String> sourceTargetPair : m_sourceTargetPairs) {
            String target = sourceTargetPair.getSecond();
            if (CmsStringUtil.joinPaths(path, "/").startsWith(CmsStringUtil.joinPaths(target, "/"))) {
                return true;
            }
        }
        return false;
    }
1303825
protected boolean isInSources(String path) {

        for (CmsPair<String, String> sourceTargetPair : m_sourceTargetPairs) {
            String source = sourceTargetPair.getFirst();
            if (CmsStringUtil.joinPaths(path, "/").startsWith(CmsStringUtil.joinPaths(source, "/"))) {
                return true;
            }
        }
        return false;
    }
211216
public boolean isPathValid(String path) {
        if (StringUtils.isEmpty(path) || !path.startsWith(ZK_PATH_SEPARATOR)
                || (path.length() > 1 && path.endsWith(ZK_PATH_SEPARATOR))) {
            return false;
        }
        return true;
    }
469103
protected String checkRoot(String path){
		if(path==null||path.length()==0||path.equals("/")){
			return "";
			
		}else if(path.endsWith("/")){
			return path.substring(0,path.length()-1);
		}else if(path.startsWith("/")){
			return path.substring(1,path.length());
		}else{
			return  path;
		}
	}
759966
private boolean isMap(PropertyPath path) {
        if (schemaRoot != null) {
            Schema schema = this.schemaRoot.find(path);
            return schema != null && (schema.hasChild(NodeId.ANY_KEY) || schema.hasChild(NodeId.ANY));
        }
        return false;
    }
62998
public static boolean checkIsPathOrLinkToSvg(String path) {

        if (path == null) {
            return false;
        }
        path = path.trim().toLowerCase();
        int paramPos = path.indexOf("?");
        if (paramPos >= 0) {
            path = path.substring(0, paramPos);
        }
        return path.endsWith(".svg");
    }
457523
public static boolean isXBEL(final String path) {
        if (path == null) {
            return false;
        }
        if (path.endsWith(XBEL_EXTENSION)) {
            return true;
        }
        return false;
    }
814451
private boolean isIgnored(Path p) {
        final String path = toFQName(p);
        return this.ignoredFolders.stream().anyMatch(path::startsWith);
    }
618041
public boolean isAssetFile(File path) {
        boolean isAsset = false;

        try {
            if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) {
                if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) {
                    isAsset = true;
                } else if (FileUtil.isFileInDirectory(path, config.getContentFolder())
                    && FileUtil.getNotContentFileFilter().accept(path)) {
                    isAsset = true;
                }
            }
        } catch (IOException ioe) {
            LOGGER.error("Unable to determine the path to asset file {}", path.getPath(), ioe);
        }
        return isAsset;
    }
135796
boolean isPrefixOf(BasePath<B> path) {
    ImmutableList<String> prefixSegments = getSegments();
    ImmutableList<String> childSegments = path.getSegments();
    if (prefixSegments.size() > path.getSegments().size()) {
      return false;
    }
    for (int i = 0; i < prefixSegments.size(); i++) {
      if (!prefixSegments.get(i).equals(childSegments.get(i))) {
        return false;
      }
    }
    return true;
  }
1088127
protected boolean parentExists(String path) throws IOException {
    // Assume root always has a parent
    if (isRoot(path)) {
      return true;
    }
    String parentKey = getParentPath(path);
    return parentKey != null && isDirectory(parentKey);
  }
1118974
private boolean isInSubsite(List<String> subSitePaths, String path) {

        boolean result = false;
        for (String subSite : subSitePaths) {
            if (path.startsWith(subSite)) {
                result = true;
                break;
            }
        }
        return result;
    }
352611
@Override
    public boolean startsWith(final Path other) {
        // Precondition checks
        if (other == null) {
            throw new IllegalArgumentException("other path must be specified");
        }
        // Unequal FS
        if (this.getFileSystem() != other.getFileSystem()) {
            return false;
        }

        // Tokenize each
        final List<String> ourTokens = tokenize(this);
        final List<String> otherTokens = tokenize((ShrinkWrapPath) other);

        // Inequal roots
        if (other.isAbsolute() && !this.isAbsolute()) {
            return false;
        }

        // More names in the other Path than we have
        final int otherTokensSize = otherTokens.size();
        if (otherTokensSize > ourTokens.size()) {
            return false;
        }

        // Ensure each of the other name elements match ours
        for (int i = 0; i < otherTokensSize; i++) {
            if (!otherTokens.get(i).equals(ourTokens.get(i))) {
                return false;
            }
        }

        // All conditions met
        return true;
    }
513103
@Override
	public boolean matchPath(String path) {

		boolean match = false;
		if (StringUtils.isNotEmpty(path)) {
			match = path.endsWith(suffix);
		}
		return match;
	}
463099
protected boolean checkParentDirs(String path, boolean create_if_absent) throws IOException {
        String[] components=Util.components(path, File.separator);
        if(components == null)
            return false;
        if(components.length == 1) // no parent directories to create, e.g. "data.txt"
            return true;

        StringBuilder sb=new StringBuilder();
        boolean first=true;

        for(int i=0; i < components.length-1; i++) {
            String tmp=components[i];
            if(!tmp.equals(File.separator)) {
                if(first)
                    first=false;
                else
                    sb.append(File.separator);
            }
            sb.append(tmp);
            String comp=sb.toString();
            if(exists(comp)) {
                if(isFile(comp))
                    throw new IOException("cannot create " + path + " as component " + comp + " is a file");
            }
            else {
                if(create_if_absent)
                    cache.put(comp, new Metadata(0, System.currentTimeMillis(), chunk_size, Metadata.DIR), (short)-1, 0);
                else
                    return false;
            }
        }
        return true;
    }