Returns the absolute link to the given root path.<p>

@param rootPath the root path
@param callback the callback to execute
191003
public void substituteLinkForRootPath(final String rootPath, final I_CmsSimpleCallback<String> callback) {

        CmsRpcAction<String> action = new CmsRpcAction<String>() {

            @Override
            public void execute() {

                getVfsService().substituteLinkForRootPath(getSiteRoot(), rootPath, this);
            }

            @Override
            protected void onResponse(String result) {

                callback.execute(result);
            }
        };
        action.execute();
    }
390719
public static Path getRootPath(Path path) {
    if (path.isRoot()) {
      return path;
    }
    return getRootPath(path.getParent());
  }
769519
public static synchronized String getAbsolutePath(String path) {
		try {
			if (rootDir == null) {
				Class<?> parentClass = getParentClass();
				String classFile = parentClass.getName().replace('.', '/') + ".class";
				URL url = parentClass.getResource("/" + classFile);
				if (url == null) {
					return null;
				}
				if (url.getProtocol().equals("jar")) {
					rootDir = url.getPath();
					int i = rootDir.lastIndexOf('!');
					if (i >= 0) {
						rootDir = rootDir.substring(0, i);
					}
					rootDir = new File(new URL(rootDir).toURI()).getParent();
				} else {
					rootDir = new File(url.toURI()).getPath();
					rootDir = rootDir.substring(0, rootDir.length() - classFile.length());
					if (rootDir.endsWith(File.separator)) {
						rootDir = rootDir.substring(0, rootDir.length() - 1);
					}
				}
				rootDir = new File(rootDir).getParent();
			}
			return new File(rootDir + File.separator + path).getCanonicalPath();
		} catch (IOException | URISyntaxException e) {
			throw new RuntimeException(e);
		}
	}
1304832
protected String getRelativePath(String ancestor, String rootPath) {

        String result = rootPath.substring(ancestor.length());
        result = CmsStringUtil.joinPaths("/", result, "/");
        return result;
    }
140312
public static File getRelativePath(final File relativePath) {
        final String p = getRelativePathForPath(relativePath.getPath(), File.separator);
        return p != null ? new File(p) : null;
    }
566753
def static_absolute_tag(context, path):
    
    request = context.get("request")
    return urljoin(request.ABSOLUTE_ROOT, static_url(path))
1164850
func RootPath(root, path string) (string, error) {
	if path == "" {
		return root, nil
	}
	var linksWalked int // to protect against cycles
	for {
		i := linksWalked
		newpath, err := walkLinks(root, path, &linksWalked)
		if err != nil {
			return "", err
		}
		path = newpath
		if i == linksWalked {
			newpath = filepath.Join("/", newpath)
			if path == newpath {
				return filepath.Join(root, newpath), nil
			}
			path = newpath
		}
	}
}
1129650
function (path) {
        if (path && path.match(/^data:(.*?)base64,/)) {
            return path;
        }

        var rootPath = this.bufferRootPath;
        if (rootPath == null) {
            rootPath = this.rootPath;
        }
        return util$1.relative2absolute(path, rootPath);
    }
15568
public void loadPath(final String sitePath, final AsyncCallback<CmsClientSitemapEntry> callback) {

        loadPath(sitePath, false, callback);
    }
1185817
public static String concatenateUrls(String rootUrl, String path) {
        if (rootUrl == null || rootUrl.isEmpty()) {
            return path;
        }

        if (path == null || path.isEmpty()) {
            return rootUrl;
        }

        String finalUrl;

        if (rootUrl.charAt(rootUrl.length() - 1) == '/' && path.charAt(0) == '/') {
            finalUrl = rootUrl.substring(0, rootUrl.length() - 2) + path;
        } else if (rootUrl.charAt(rootUrl.length() - 1) != '/' && path.charAt(0) != '/') {
            finalUrl = rootUrl + "/" + path;
        } else {
            finalUrl = rootUrl + path;
        }

        return finalUrl;
    }
416640
static public String getPathToRoot(JBakeConfiguration config, File rootPath, File sourceFile) {

        Path r = Paths.get(rootPath.toURI());
        Path s = Paths.get(sourceFile.getParentFile().toURI());
        Path relativePath = s.relativize(r);

        StringBuilder sb = new StringBuilder();

        sb.append(asPath(relativePath.toString()));

        if (config.getUriWithoutExtension()) {
            sb.append("/..");
        }
        if (sb.length() > 0) {  // added as calling logic assumes / at end.
            sb.append("/");
        }
        return sb.toString();
    }
1262785
def get_root_path(self, path):
        """"""
        # Look at the directories present in the current working directory. In
        # case a .svn directory is present, we know we are in the root directory
        # of a Subversion repository (for Subversion 1.7.x). In case no
        # repository specific folder is found, and the current directory has a
        # parent directory, look if a repository specific directory can be found
        # in the parent directory.
        while path != '/':
            if '.svn' in os.listdir(path):
                return path
            path = os.path.abspath(os.path.join(path, os.pardir))

        # No Subversion repository found.
        return None
398014
private String translatePathExternal(String intpath) {
        if (fullPath) {
            return intpath;
        } else {
            return PathUtil.appendPath(rootPath.getPath(), intpath);
        }
    }
109697
public static Instance findInstanceByPath( Instance rootInstance, String instancePath ) {

		Application tempApplication = new Application( new ApplicationTemplate());
		if( rootInstance != null )
			tempApplication.getRootInstances().add( rootInstance );

		return findInstanceByPath( tempApplication, instancePath );
	}
256948
public Locale getMainLocale(String rootPath) {

        CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(rootPath);
        if (site == null) {
            return null;
        }
        return site.getMainTranslationLocale(null);
    }
985945
public void getSubFolders(String path, AsyncCallback<List<CmsVfsEntryBean>> callback) {

        m_controller.getSubFolders(path, callback);
    }
930352
public static String getCategoryPath(String rootPath, String baseFolder) throws CmsException {

        String base;
        if (rootPath.startsWith(CmsCategoryService.CENTRALIZED_REPOSITORY)) {
            base = CmsCategoryService.CENTRALIZED_REPOSITORY;
        } else {
            base = baseFolder;
            if (!base.endsWith("/")) {
                base += "/";
            }
            if (!base.startsWith("/")) {
                base = "/" + base;
            }
            int pos = rootPath.indexOf(base);
            if (pos < 0) {
                throw new CmsDataAccessException(
                    Messages.get().container(Messages.ERR_CATEGORY_INVALID_LOCATION_1, rootPath));
            }
            base = rootPath.substring(0, pos + base.length());
        }
        return rootPath.substring(base.length());
    }