Returns <code>true</code> if a specified path or any descendant path
is matched by pattern.

@param pattern
pattern for node path
@param absPath
node absolute path
@return a <code>boolean</code>.
774358
public static boolean acceptDescendant(String pattern, String absPath)
   {
      absPath = normalizePath(absPath);
      pattern = adopt2JavaPattern(pattern);

      // allows any descendants after
      pattern += "(/.+)?";

      return absPath.matches(pattern);
   }
260095
public static int matchPathOne(String platformDependentPath, String... patterns) {
		for (int i = 0; i < patterns.length; i++) {
			if (matchPath(platformDependentPath, patterns[i])) {
				return i;
			}
		}
		return -1;
	}
636516
public static boolean excludePath(String path) {
        String[] excludePatterns = SiteProperties.getExcludePatterns();
        if (ArrayUtils.isNotEmpty(excludePatterns)) {
            return RegexUtils.matchesAny(path, excludePatterns);
        } else {
            return false;
        }
    }
370337
public boolean exists(String path) {
        Iterator i = vHostTable.keySet().iterator();

        while (i.hasNext()) {
            try {
                String pattern = (String) i.next();
                // System.out.println("Pattern = "+pattern);
                if (path.matches(pattern))
                    return true;
            } catch (Exception e) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Caught an exception in exists():", e);
                }
                return false;
            }
        }

        return false;
    }
668646
static private boolean isAncestorPath(String x, String y) {
    if (!y.startsWith(x)) {
      return false;
    }
    final int len = x.length();
    return y.length() == len || y.charAt(len) == Path.SEPARATOR_CHAR;  
  }
778616
private boolean pathMatches(Path path, SquigglyContext context) {
        List<SquigglyNode> nodes = context.getNodes();
        Set<String> viewStack = null;
        SquigglyNode viewNode = null;

        int pathSize = path.getElements().size();
        int lastIdx = pathSize - 1;

        for (int i = 0; i < pathSize; i++) {
            PathElement element = path.getElements().get(i);

            if (viewNode != null && !viewNode.isSquiggly()) {
                Class beanClass = element.getBeanClass();

                if (beanClass != null && !Map.class.isAssignableFrom(beanClass)) {
                    Set<String> propertyNames = getPropertyNamesFromViewStack(element, viewStack);

                    if (!propertyNames.contains(element.getName())) {
                        return false;
                    }
                }

            } else if (nodes.isEmpty()) {
                return false;
            } else {

                SquigglyNode match = findBestSimpleNode(element, nodes);

                if (match == null) {
                    match = findBestViewNode(element, nodes);

                    if (match != null) {
                        viewNode = match;
                        viewStack = addToViewStack(viewStack, viewNode);
                    }
                } else if (match.isAnyShallow()) {
                    viewNode = match;
                } else if (match.isAnyDeep()) {
                    return true;
                }

                if (match == null) {
                    if (isJsonUnwrapped(element)) {
                        continue;
                    }

                    return false;
                }

                if (match.isNegated()) {
                    return false;
                }

                nodes = match.getChildren();

                if (i < lastIdx && nodes.isEmpty() && !match.isEmptyNested() && SquigglyConfig.isFilterImplicitlyIncludeBaseFields()) {
                    nodes = BASE_VIEW_NODES;
                }
            }
        }

        return true;
    }
868217
@Override
	public boolean matchPath(String path) {

		boolean match = false;
		if (StringUtils.isNotEmpty(path)) {
			match = path.startsWith(prefix);
		}
		return match;
	}
272857
public boolean matches(String path, MatchingStrategy matchingStrategy) {
    return path!=null && matchingStrategy.matches(clause, path);
  }
1009770
public boolean match(String accessPath) {
        if (extension != null) {
            for (int i = accessPath.length() - 1; i >= 0; i--) {
                if (accessPath.charAt(i) == '.') {
                    String ext = accessPath.substring(i + 1);
                    if (extension.equals(ext)) {
                        return true;
                    }
                    break;
                }
            }
        }
        if (accessPath.equals(path)) {
            return true;
        }
        if (prefix != null && accessPath.startsWith(prefix)) {
            return true;
        }
        return false;
    }
165559
def match(self, filepath):
        
        for pattern in self.__pattern:
            if len(fnmatch.filter([filepath], pattern)) > 0:
                return True
        return False
983326
public boolean isFiltered(String path) {

        for (int j = 0; j < m_filterRules.size(); j++) {
            Pattern pattern = m_filterRules.get(j);
            if (isPartialMatch(pattern, path)) {
                return m_type.equals(TYPE_EXCLUDE);
            }
        }

        return m_type.equals(TYPE_INCLUDE);
    }
650601
private final boolean matchPattern(byte[][] patterns, int bufferIndex)
   {
      boolean match = false;
      for (byte[] pattern : patterns)
      {
         int index = 0;
         match = true;
         for (byte b : pattern)
         {
            if (b != m_buffer[bufferIndex + index])
            {
               match = false;
               break;
            }
            ++index;
         }
         if (match)
         {
            break;
         }
      }
      return match;
   }
76035
protected boolean doesUriMatchPattern(final String requestPath, final String patternUrl) {
        val pattern = Pattern.compile('/' + patternUrl + "(/)*$");
        return pattern.matcher(requestPath).find();
    }
252044
protected boolean match(final String path) {

        final String methodName = "match";

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName, this, path, ignoreCase, wildcard);
        }

        if (this.matcher == null) {
            if (ignoreCase) {
                if (pattern.equalsIgnoreCase(path)) {
                    return true;
                }
                if (wildcard && path.toLowerCase().startsWith(pattern)) {
                    return true;
                }
            } else {
                if (pattern.equals(path)) {
                    return true;
                }
                if (wildcard && path.startsWith(pattern)) {
                    return true;
                }
            }
        } else {
            return this.matcher.matcher(path).matches();
        }

        return false;
    }
1175
public static String extractCommonAncestor(String pattern, String absPath)
   {
      pattern = normalizePath(pattern);
      absPath = normalizePath(absPath);

      String[] patterEntries = pattern.split("/");
      String[] pathEntries = absPath.split("/");

      StringBuilder ancestor = new StringBuilder();
      int count = Math.min(pathEntries.length, patterEntries.length);

      for (int i = 1; i < count; i++)
      {
         if (acceptName(patterEntries[i], pathEntries[i]))
         {
            ancestor.append("/");
            ancestor.append(pathEntries[i]);
         }
         else
         {
            break;
         }
      }

      return ancestor.length() == 0 ? JCRPath.ROOT_PATH : ancestor.toString();
   }
140838
private boolean isTabRootLevel(String path) {

        path = path.substring(1);
        if (!path.contains("/")) {
            return true;
        }
        if (m_tabInfos != null) {
            for (CmsTabInfo info : m_tabInfos) {
                if (info.isCollapsed()
                    && path.startsWith(info.getStartName())
                    && !path.substring(info.getStartName().length() + 1).contains("/")) {
                    return true;
                }
            }
        }
        return false;
    }
1107690
boolean isIntermediaryPath(final JsonPointer jp) {
        List<String> jpRefTokens = jp.tokens();
        int jpSize = jpRefTokens.size();
        if (jpSize == 1) {
            return false;
        }

        Node node = root;
        for (int i = 1; i < jpSize; i++) {
            Node childMatch = node.match(jpRefTokens.get(i));
            if (childMatch == null) {
                return false;
            } else {
                node = childMatch;
            }
        }

        return node.children != null;
    }