code: public PathImpl lookupImpl(String userPath,
                           Map<String,Object> newAttributes,
                           boolean isAllowRoot)
    {
      if (userPath == null) {
        return lookupImpl(getPath(), newAttributes, isAllowRoot);
      }
  
      if (! isAllowRoot) {
        return schemeWalk(userPath, newAttributes, userPath, 0);
      }
  
      String scheme = scanScheme(userPath);
  
      if (scheme == null) {
        return schemeWalk(userPath, newAttributes, userPath, 0);
      }
  
      PathImpl path;
  
      SchemeMap schemeMap = _schemeMap;
  
      // Special case to handle the windows special schemes
      // c:xxx -> file:/c:xxx
      if (isWindows()) {
        int length = scheme.length();
        char ch;
  
        if (length == 1
            && ('a' <= (ch = scheme.charAt(0)) && ch <= 'z'
                || 'A' <= ch && ch <= 'Z')) {
          userPath = Character.toLowerCase(ch) + userPath.substring(1);
          
          if (_isTestWindows)
            return schemeWalk(userPath, newAttributes, "/" + userPath, 0);
  
          path = schemeMap.get("file");
  
          if (path != null)
            return path.schemeWalk(userPath, newAttributes, "/" + userPath, 0);
          else
            return schemeWalk(userPath, newAttributes, "/" + userPath, 0);
        }
      }
  
      path = schemeMap.get(scheme);
      
      // assume the foo:bar is a subfile
      if (path == null) {
        return schemeWalk(userPath, newAttributes, userPath, 0);
      }
      else {
        return path.schemeWalk(userPath, newAttributes,
                               userPath, scheme.length() + 1);
      }
    }
docs: Returns a new path relative to the current one.
  
  <p>Path only handles scheme:xxx.  Subclasses of Path will specialize
  the xxx.
  
  @param userPath relative or absolute path, essentially any url.
  @param newAttributes attributes for the new path.
  
  @return the new path or null if the scheme doesn't exist