Get the relative path.

@return the relative path
480438
public String getRelativePath() {
        final StringBuilder builder = new StringBuilder();
        for(final String p : path) {
            builder.append(p).append("/");
        }
        builder.append(getName());
        return builder.toString();
    }
451128
public String getRawPath() {
    List<String> pathParts = this.pathParts;
    if (pathParts == null) {
      return null;
    }
    StringBuilder buf = new StringBuilder();
    appendRawPathFromParts(buf);
    return buf.toString();
  }
1293939
@Override
    public String getPath() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getPath();
        return null;
    }
1317303
public function path()
    {
        $dirname = $this->dirname();

        if ($this->parent instanceof Root) { //at root

            return $dirname.$this->basename();
        }

        return sprintf('%s/%s', $dirname, $this->basename());

    }
1011708
public static String getStaticPath() {
        if (null == staticPath) {
            staticPath = getLatkeProperty("staticPath");

            if (null == staticPath) {
                staticPath = getContextPath();
            }
        }

        return staticPath;
    }
523058
final public RelativePath relativePath() throws ParseException {
  RelativePath relPath = null;
  Step step;
    step = step();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case SLASH:
      jj_consume_token(SLASH);
      relPath = relativePath();
      break;
    default:
      jj_la1[1] = jj_gen;
      ;
    }
   {if (true) return new RelativePath(step, relPath);}
    throw new Error("Missing return statement in function");
  }
253032
public String getPath() {

        String path = getFullPath();
        if (m_relativeTo != null) {
            path = getResource().getRootPath();
            if (path.startsWith(m_relativeTo)) {
                path = path.substring(m_relativeTo.length());
                if (path.length() == 0) {
                    path = ".";
                }
            } else {
                String site = getSite();
                if (path.startsWith(site + "/") || path.equals(site)) {
                    path = path.substring(site.length());
                }
            }
        }
        if (m_abbrevLength > 0) {
            boolean absolute = path.startsWith("/");
            path = CmsStringUtil.formatResourceName(path, m_abbrevLength);
            if (!absolute && path.startsWith("/")) {
                // remove leading '/'
                path = path.substring(1);
            }
        }
        return path;
    }
196435
public String getParentXPath() {
        Iterator<Level> levelIterator = path.descendingIterator();
        if (levelIterator.hasNext()) {
            levelIterator.next();
        }
        return getXPath(levelIterator);
    }
421275
public static String buildProperPath(String parentPath, String relativePathFromParent) {
        if (relativePathFromParent == null) return null;
        if (parentPath != null) {
            parentPath = parentPath.trim();
        }

        if (relativePathFromParent.startsWith(PATH_CURRENT)) {
            relativePathFromParent = relativePathFromParent.replaceFirst("(./)+", "");
        }

        String path;

        if (relativePathFromParent.startsWith(PATH_ROOT)) { //absolute
            path = relativePathFromParent;
        } else if (relativePathFromParent.startsWith(PATH_PARENT)) {
            while (relativePathFromParent.startsWith(PATH_PARENT)) {
                relativePathFromParent = relativePathFromParent.replaceFirst(PATH_PARENT, "");
                if (relativePathFromParent.startsWith(PATH_CURRENT)) {
                    relativePathFromParent = relativePathFromParent.replaceFirst(PATH_CURRENT, "");
                }
                parentPath = (parentPath == null || parentPath.equals(PATH_ROOT)) ? PATH_ROOT : getParentPath(parentPath);
            }
            path = parentPath + PATH_ROOT + relativePathFromParent;
        } else {
            path = parentPath + PATH_ROOT + relativePathFromParent;
        }

        return path.replaceAll("(/|\\./)+", "$1");
    }
902146
protected static String getPath(String fullPath)
   {
      int sl = fullPath.lastIndexOf('/');
      return sl > 0 ? "/" + fullPath.substring(0, sl) : "/";
   }
1073313
public function getPath()
	{
		$realpath	= realpath( $this->fileName );
		$path	= dirname( $realpath );
		$path	= str_replace( "\\", "/", $path );
		$path	.= "/";
		return	$path;
	}
1329892
public static String getRootClassPath() {
		if (rootClassPath == null) {
			try {
				// String path = PathKit.class.getClassLoader().getResource("").toURI().getPath();
				String path = getClassLoader().getResource("").toURI().getPath();
				rootClassPath = new File(path).getAbsolutePath();
			}
			catch (Exception e) {
				// String path = PathKit.class.getClassLoader().getResource("").getPath();
				// String path = getClassLoader().getResource("").getPath();
				// rootClassPath = new File(path).getAbsolutePath();
				
				try {
					String path = PathKit.class.getProtectionDomain().getCodeSource().getLocation().getPath();
					path = java.net.URLDecoder.decode(path, "UTF-8");
					if (path.endsWith(File.separator)) {
						path = path.substring(0, path.length() - 1);
					}
					rootClassPath = path;
				} catch (UnsupportedEncodingException e1) {
					throw new RuntimeException(e1);
				}
			}
		}
		return rootClassPath;
	}
775822
def _get_relative_path(self):
    """"""
    param_string = self._get_query_string()
    if self.path is None:
      path = '/'
    else:
      path = self.path
    if param_string:
      return '?'.join([path, param_string])
    else:
      return path
1044844
public function getRootPath()
    {
        if (null === $this->rootPath) {
            $this->rootPath = dirname((new \ReflectionClass($this))->getFileName());
        }

        return $this->rootPath;
    }
883647
public String path() {
    /* build the fully qualified url with all query parameters */
    StringBuilder path = new StringBuilder();
    if (this.target != null) {
      path.append(this.target);
    }
    if (this.uriTemplate != null) {
      path.append(this.uriTemplate.toString());
    }
    if (path.length() == 0) {
      /* no path indicates the root uri */
      path.append("/");
    }
    return path.toString();

  }
1258909
public String getPath() {
    StringBuilder result = new StringBuilder().append('$');
    for (int i = 0, size = stackSize; i < size; i++) {
      switch (stack[i]) {
        case JsonScope.EMPTY_ARRAY:
        case JsonScope.NONEMPTY_ARRAY:
          result.append('[').append(pathIndices[i]).append(']');
          break;

        case JsonScope.EMPTY_OBJECT:
        case JsonScope.DANGLING_NAME:
        case JsonScope.NONEMPTY_OBJECT:
          result.append('.');
          if (pathNames[i] != null) {
            result.append(pathNames[i]);
          }
          break;

        case JsonScope.NONEMPTY_DOCUMENT:
        case JsonScope.EMPTY_DOCUMENT:
        case JsonScope.CLOSED:
          break;
      }
    }
    return result.toString();
  }
165468
public String getRelativePath(File from, File to) {
        Path fromPath = Paths.get(from.getPath()).normalize().toAbsolutePath();
        Path toPath = Paths.get(to.getPath()).normalize().toAbsolutePath();
        return fromPath.relativize(toPath).toString().replace('\\', '/');
    }