The path of the request

@param path      string path to use when generating requests
@param pathRegex regular expression to use to match paths
517614
public PactDslRequestWithPath matchPath(String pathRegex, String path) {
        requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex));
        this.path = path;
        return this;
    }
846139
protected static String normalizePath (String path) {
    int pathLen;
    do {
      pathLen = path.length();
      path = path.replaceAll("[^/]+/\\.\\./", "");
    } while (path.length() != pathLen);
    return path;
  }
1119946
public ResolvedRequest withPath( String path ) {
        assert repositoryName != null;
        assert workspaceName != null;
        return new ResolvedRequest(request, repositoryName, workspaceName, path);
    }
1061700
private InputStream tryPath(String path) {
    Logger.getLogger().debug("Trying path \"" + path + "\".");
    return getClass().getResourceAsStream(path);
  }
819940
public java.lang.String getUploadPathRegex() {
    java.lang.Object ref = uploadPathRegex_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      uploadPathRegex_ = s;
      return s;
    }
  }
155122
public function checkPath($path = null)
  {
    if($path === null)
    {
      $path = $this->path;
    }

    if(strlen($path) == 0)
    {
      return TRUE;
    }

    $pattern = "/^" . $this->regex["path"] . "$/";
    $status = @preg_match($pattern, $path);

    if($status === FALSE)
    {
      throw new Exception("URI path validation failed");
    }

    return ($status == 1);
  }
653965
public AbstractCharSequenceAssert<?, String> jsonPathAsString(String path) {
        return Assertions.assertThat(actual.read(path, String.class));
    }
1333199
protected boolean isValidPath(String path) {
        if (path == null) {
            return false;
        }
        
        if (!PATH_PATTERN.matcher(path).matches()) {
            return false;
        }
        
        try {
            URI uri = new URI(null,null,path,null);
            String norm = uri.normalize().getPath();
            if (norm.startsWith("/../") // Trying to go via the parent dir 
                    || norm.equals("/..")) {   // Trying to go to the parent dir
                return false;
            }
        } catch (URISyntaxException e) {
            return false;
        }
        
        int slash2Count = countToken("//", path);
        if (isOff(ALLOW_2_SLASHES) && (slash2Count > 0)) {
            return false;
        }
        
        return true;
    }
1081932
function(context) {

            // Check path
            var path = context.request.urlInfo.pathname;

            if (path.indexOf(this.$.path) === 0) {
                // path matches
                if (this.$.route !== null) {
                    return (new RegExp(this.$.route, "i")).test(path);
                }

                return true;
            }

            return false;
        }
1341687
boolean matches(final String path) {

        logger.debug("path to match: {}", path);

        if (excludedPaths.contains(path)) {
            return false;
        }

        for (Pattern pattern : excludedPatterns) {
            if (pattern.matcher(path).matches()) {
                return false;
            }
        }

        return true;
    }
1084318
public static String relativizePath(String path, boolean withIndex)
   {

      if (path.startsWith("/"))
         path = path.substring(1);
      if (!withIndex && path.endsWith("]"))
      {
         int index = path.lastIndexOf('[');
         return index == -1 ? path : path.substring(0, index);
      }
      return path;
   }
177036
private static String rewritePath(String path) {
        while (path.startsWith("/")) {
            path = path.substring(1);
        }
        // Note, ClassLoader paths are always absolute, so , so no leading slash
        return "resources/" + path;
    }
660731
private boolean matchesPath(String routePath, String pathToMatch) {
		routePath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE);
		return pathToMatch.matches("(?i)" + routePath);
	}
1306350
public static Predicate<String> regex(final String pathRegex) {
    return new Predicate<String>() {
      @Override
      public boolean test(String input) {
        return input.matches(pathRegex);
      }
    };
  }
239611
public static void validatePath(String path) throws InvalidPathException {
    boolean invalid = (path == null || path.isEmpty());
    if (!OSUtils.isWindows()) {
      invalid = (invalid || !path.startsWith(AlluxioURI.SEPARATOR));
    }

    if (invalid) {
      throw new InvalidPathException(ExceptionMessage.PATH_INVALID.getMessage(path));
    }
  }
291079
public PathMatcher.PathMatch<T> match(String path){
		if (!exactPathMatches.isEmpty()) {
			T match = getExactPath(path);
			if (match != null) {
				UndertowLogger.REQUEST_LOGGER.debugf("Matched exact path %s", path);
				return new PathMatcher.PathMatch<>(path, "", match);
			}
		}

		int length = path.length();
		final int[] lengths = this.lengths;
		for (int i = 0; i < lengths.length; ++i) {
			int pathLength = lengths[i];
			if (pathLength == length) {
				SubstringMap.SubstringMatch<T> next = paths.get(path, length);
				if (next != null) {
					UndertowLogger.REQUEST_LOGGER.debugf("Matched prefix path %s for path %s", next.getKey(), path);
					return new PathMatcher.PathMatch<>(path, "", next.getValue());
				}
			} else if (pathLength < length) {
				char c = path.charAt(pathLength);
				if (c == '/') {

					//String part = path.substring(0, pathLength);
					SubstringMap.SubstringMatch<T> next = paths.get(path, pathLength);
					if (next != null) {
						UndertowLogger.REQUEST_LOGGER.debugf("Matched prefix path %s for path %s", next.getKey(), path);
						return new PathMatcher.PathMatch<>(next.getKey(), path.substring(pathLength), next.getValue());
					}
				}
			}
		}
		UndertowLogger.REQUEST_LOGGER.debugf("Matched default handler path %s", path);
		return new PathMatcher.PathMatch<>("", path, defaultHandler);
	}
394889
public static String urlEncode(String path) throws URISyntaxException {
        if (isNullOrEmpty(path)) return path;

        return UrlEscapers.urlFragmentEscaper().escape(path);
    }