Computes the site path of the folder, which is either the original path constructor argument, or the site
path of the original resource constructor argument.<p>

@param cms the current CMS context
@return the site path of the lazy folder
558732
public String getSitePath(CmsObject cms) {

        if (m_path != null) {
            return m_path;
        } else if (m_folder != null) {
            return cms.getRequestContext().removeSiteRoot(m_folder.getRootPath());
        }
        return null;
    }
1051748
private String getInitialTarget(CmsObject cms, CmsResource resource) {

        String sitePath = cms.getSitePath(resource);
        String parent = CmsResource.getParentFolder(sitePath);
        if (parent != null) {
            return parent;
        } else {
            String rootParent = CmsResource.getParentFolder(resource.getRootPath());
            if (rootParent != null) {
                return rootParent;
            } else {
                return sitePath;
            }
        }
    }
510157
protected List<CmsResource> getMovedFolders(CmsObject cms) throws CmsException {

        CmsProject onlineProject = cms.readProject(CmsProject.ONLINE_PROJECT_ID);
        List<CmsResource> movedFolders = new ArrayList<CmsResource>();
        for (CmsResource folder : m_folderList) {
            if (folder.getState().isChanged()) {
                CmsProject oldProject = cms.getRequestContext().getCurrentProject();
                boolean isMoved = false;
                try {
                    cms.getRequestContext().setCurrentProject(onlineProject);
                    CmsResource onlineResource = cms.readResource(folder.getStructureId());
                    isMoved = !onlineResource.getRootPath().equals(folder.getRootPath());
                } catch (CmsVfsResourceNotFoundException e) {
                    // resource not found online, this means it doesn't matter whether it has been moved
                } finally {
                    cms.getRequestContext().setCurrentProject(oldProject);
                }
                if (isMoved) {
                    movedFolders.add(folder);
                }
            }
        }
        return movedFolders;
    }
641681
public CmsFile getFile() {

        if ((m_file == null) && !isFolder()) {
            try {
                m_file = m_cms.readFile(this);
            } catch (CmsException e) {
                // this should not happen since we are updating from a resource object
            }
        }
        return m_file;
    }
142041
private String getRootPath(Object resource) {

        if (resource instanceof CmsResource) {
            return ((CmsResource)resource).getRootPath();
        }
        if (resource instanceof CmsPublishedResource) {
            return ((CmsPublishedResource)resource).getRootPath();
        }
        throw new IllegalArgumentException("wrong format of resources"); //should never happen
    }
1322275
public CPath getCPath()
    {
        if ( parent == null ) {
            return CPath.ROOT;
        }

        CMFolder currentFolder = this;
        StringBuilder path = new StringBuilder(  );

        while ( currentFolder.parent != null ) {
            path.insert( 0, currentFolder.name );
            path.insert( 0, '/' );

            currentFolder = currentFolder.parent;
        }

        return new CPath( path.toString() );
    }
670685
private String getLogFolderPath() {

        String path = null;
        if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) {
            path = new File(OpenCms.getSystemInfo().getLogFileRfsPath()).getParent();
            // making sure the path ends with the file separator CHAR
            if ((path != null) && !path.endsWith(File.separator)) {
                path += File.separator;
            }

        }
        return path;
    }
135490
public String getPath() {

        StringBuffer path = new StringBuffer("/");
        CmsTreeItem current = this;
        while (current != null) {
            path.insert(0, current.getId()).insert(0, "/");
            current = current.getParentItem();
        }
        String result = path.toString();
        if (result.startsWith("//")) {
            // This happens if the root item has an empty id.
            // In that case, we cut off the first slash.
            result = result.substring(1);
        }
        return result;
    }
497919
public String getSelectPath(CmsSitemapEntryBean sitemapEntry) {

        String normalizedSiteRoot = CmsStringUtil.joinPaths(CmsCoreProvider.get().getSiteRoot(), "/");
        String rootPath = sitemapEntry.getRootPath();
        if (rootPath.startsWith(normalizedSiteRoot)) {
            return rootPath.substring(normalizedSiteRoot.length() - 1);
        }
        return sitemapEntry.getRootPath();
    }
1022561
private String getParentFolder() {

        String relativeTo;
        if (isDirectPublish()) {
            relativeTo = CmsResource.getParentFolder(getResourceList().get(0));
        } else {
            relativeTo = getCms().getRequestContext().getSiteRoot() + "/";
        }
        return relativeTo;
    }
1118269
@Column(header = Messages.GUI_HISTORY_DIALOG_COL_PATH_0, order = 40, expandRatio = 1.0f, view = "wide")
    public String getPath() {

        String rootPath = m_bean.getRootPath();
        CmsObject cms = A_CmsUI.getCmsObject();
        String result = cms.getRequestContext().removeSiteRoot(rootPath);
        return result;
    }
1047755
public static String getFileExplorerLink(CmsObject cms, String siteRoot) {

        return CmsVaadinUtils.getWorkplaceLink()
            + "#!"
            + CmsFileExplorerConfiguration.APP_ID
            + "/"
            + cms.getRequestContext().getCurrentProject().getUuid()
            + "!!"
            + siteRoot
            + "!!";
    }
877654
public String getFullPath() {

        String path = m_resource.getRootPath();
        if ((m_siteMode != SITE_MODE_ROOT) && (m_cms != null)) {
            String site = getSite();
            if (path.startsWith(site)) {
                path = path.substring(site.length());
            }
        }
        return path;
    }
818722
public static String getNewResourceName(CmsObject cms, String fileName, String folder) {

        String newResname = CmsResource.getName(fileName.replace('\\', '/'));
        newResname = cms.getRequestContext().getFileTranslator().translateResource(newResname);
        newResname = folder + newResname;
        return newResname;
    }
35964
private static String getContextRootPath(CmsObject cms, String creationSitemap) {

        String path = null;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(creationSitemap)) {
            try {
                path = cms.readFolder(creationSitemap).getRootPath();
            } catch (CmsException e) {
                LOG.warn("The provided creation sitemap " + creationSitemap + " is not a VFS folder.", e);
            }
        }
        if (path == null) {
            path = cms.addSiteRoot(cms.getRequestContext().getFolderUri());
        }

        return path;
    }
788234
protected String getPath(CmsClientSitemapEntry entry, String newUrlName) {

        if (newUrlName.equals("")) {
            return entry.getSitePath();
        }
        return CmsResource.getParentFolder(entry.getSitePath()) + newUrlName + "/";
    }
1250564
protected String getPath(String urlName) {

        if (urlName.equals("")) {
            return m_entry.getSitePath();
        }
        return CmsResource.getParentFolder(m_entry.getSitePath()) + urlName + "/";
    }