Loads the sub entries for the given path.<p>

@param rootPath the root path
@param isRoot <code>true</code> if the requested entry is the root entry
@param callback the callback to execute with the result
762441
public void getSubEntries(
        String rootPath,
        boolean isRoot,
        I_CmsSimpleCallback<List<CmsSitemapEntryBean>> callback) {

        m_controller.getSubEntries(rootPath, isRoot, null, callback);
    }
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 );
	}
19844
public boolean isEnabledForPath(String rootPath) {

        for (String path : m_paths) {
            if (CmsStringUtil.isPrefixPath(path, rootPath)) {
                return true;
            }
        }
        return false;
    }
1198344
public void load(String filePath, ControlOverrides overrides) {
        try {
            config = new ZapXmlConfiguration(filePath);
            if (overrides != null) {
                for (Entry<String,String> entry : overrides.getOrderedConfigs().entrySet()) {
                	logger.info("Setting config " + entry.getKey() + " = " + entry.getValue() + 
                			" was " + config.getString(entry.getKey()));
                	config.setProperty(entry.getKey(), entry.getValue());
                }
            }
            parse();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
	}
77955
void openPath(String path, boolean initTree) {

        if (path == null) {
            String siteRoot = A_CmsUI.getCmsObject().getRequestContext().getSiteRoot();
            path = m_locationCache.getFileExplorerLocation(siteRoot);
            if (path == null) {
                path = "";
            } else if (OpenCms.getSiteManager().startsWithShared(path)) {
                path = path.substring(siteRoot.length());
            }
        }
        boolean existsPath = CmsStringUtil.isNotEmptyOrWhitespaceOnly(path)
            && A_CmsUI.getCmsObject().existsResource(path, FILES_N_FOLDERS);

        if (path.startsWith("/")) {
            // remove a leading slash to avoid an empty first path fragment
            path = path.substring(1);
        }

        String[] pathItems = path.split("/");

        if (initTree) {
            try {
                initFolderTree(existsPath);
            } catch (CmsException e) {
                CmsErrorDialog.showErrorDialog(
                    CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_OPEN_PATH_1, path),
                    e);
                LOG.error(e.getLocalizedMessage(), e);
                return;
            }
        }

        Collection<?> rootItems = m_treeContainer.rootItemIds();
        if (rootItems.size() != 1) {
            throw new RuntimeException("Illeagal state, folder tree has " + rootItems.size() + " children");
        }

        CmsUUID folderId = (CmsUUID)rootItems.iterator().next();
        if (initTree) {
            if (existsPath) {
                m_expandListener.setOpenPathFragment(pathItems[0]);
            }
            m_fileTree.expandItem(folderId);
            m_expandListener.setOpenPathFragment(null);
        }
        Collection<?> children = m_treeContainer.getChildren(folderId);
        for (int i = 0; i < pathItems.length; i++) {
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(pathItems[i])) {
                continue;
            }
            CmsUUID level = null;
            if (children != null) {
                for (Object id : children) {
                    if (m_treeContainer.getItem(id).getItemProperty(
                        CmsResourceTableProperty.PROPERTY_RESOURCE_NAME).getValue().equals(pathItems[i])) {
                        level = (CmsUUID)id;
                        m_expandListener.setOpenPathFragment(
                            existsPath && (i < (pathItems.length - 1)) ? pathItems[i + 1] : null);
                        m_fileTree.expandItem(level);
                        m_expandListener.setOpenPathFragment(null);
                        break;
                    }
                }
            }
            if ((level == null) || level.equals(folderId)) {
                break;
            }
            folderId = level;
            children = m_treeContainer.getChildren(folderId);
        }
        try {
            readFolder(folderId);
        } catch (CmsException e) {
            CmsErrorDialog.showErrorDialog(
                CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_OPEN_PATH_1, path),
                e);
            LOG.error(e.getLocalizedMessage(), e);
            return;
        }
    }
767214
public static void createFolder(CmsObject cms, String rootPath) throws CmsException {

        CmsObject rootCms = OpenCms.initCmsObject(cms);
        rootCms.getRequestContext().setSiteRoot("");
        List<String> parents = new ArrayList<String>();
        String currentPath = rootPath;
        while (currentPath != null) {
            if (rootCms.existsResource(currentPath)) {
                break;
            }
            parents.add(currentPath);
            currentPath = CmsResource.getParentFolder(currentPath);
        }
        parents = Lists.reverse(parents);
        for (String parent : parents) {
            try {
                rootCms.createResource(
                    parent,
                    OpenCms.getResourceManager().getResourceType(CmsResourceTypeFolder.getStaticTypeName()));
                try {
                    rootCms.unlockResource(parent);
                } catch (CmsException e) {
                    // may happen if parent folder is locked also
                    if (LOG.isInfoEnabled()) {
                        LOG.info(e);
                    }
                }
            } catch (CmsVfsResourceAlreadyExistsException e) {
                // nop
            }
        }
    }
459804
synchronized Entry getZipIndexEntry(RelativePath path) {
        try {
            checkIndex();
            DirectoryEntry de = directories.get(path.dirname());
            String lookFor = path.basename();
            return (de == null) ? null : de.getEntry(lookFor);
        }
        catch (IOException e) {
            return null;
        }
    }
249712
private boolean isInRoots(String canonicalPath) {

        if (canonicalPath.startsWith(m_rootPath)) {
            return true;
        }
        if (m_additionalRoots != null) {
            for (String root : m_additionalRoots) {
                if (canonicalPath.startsWith(root)) {
                    return true;
                }

            }
        }
        return false;
    }
995389
protected function loadMigrationFields(DOMXPath $rootPath)
    {
        $fields = $rootPath->query(
            './value[@type="list" and @key="columns"]/value[@type="object" and @struct-name="db.mysql.Column"]'
        );

        if ($fields && $fields->length) {
            /** @var \DOMNode $field */
            foreach ($fields as $field) {
                $fieldName = $rootPath->query('./value[@key="name"]', $field)->item(0)->nodeValue;

                $this->addField($fieldName)->load($field, $rootPath);
            } // foreach
        } // if

        $this->addIndicesToFields($rootPath);

        return $this->addForeignKeys($rootPath);
    }
995847
private Set<Resource<T>> listStackDirectory(Path path) {
        HashSet<Resource<T>> merge = new HashSet<Resource<T>>();
        if (treeHandlerList.size() > 0) {
            for (SelectiveTree<T> treeHandler : treeHandlerList) {
                if (PathUtil.hasRoot(treeHandler.getSubPath(), path) && !PathUtil.equals(
                    treeHandler.getSubPath(),
                    path
                )) {
                    String relativePath = PathUtil.removePrefix(path.getPath(), treeHandler.getSubPath().getPath());
                    String[] components = PathUtil.componentsFromPathString(relativePath);
                    Path subpath = PathUtil.appendPath(path, components[0]);
                    merge.add(new ResourceBase<T>(subpath, null, true));
                }
            }
        }
        return merge;
    }
5981
@Nullable
  private static <T> TreePath findEnclosingMethodOrLambdaOrInitializer(TreePath path) {
    while (path != null) {
      if (path.getLeaf() instanceof MethodTree) {
        return path;
      }
      TreePath parent = path.getParentPath();
      if (parent != null) {
        if (parent.getLeaf() instanceof ClassTree) {
          if (path.getLeaf() instanceof BlockTree) {
            // this is a class or instance initializer block
            return path;
          }
          if (path.getLeaf() instanceof VariableTree
              && ((VariableTree) path.getLeaf()).getInitializer() != null) {
            // this is a field with an inline initializer
            return path;
          }
        }
        if (parent.getLeaf() instanceof LambdaExpressionTree) {
          return parent;
        }
      }
      path = parent;
    }
    return null;
  }
1238882
@Override
  public void loadPath(File path, FileFilter filt) {
    if(path.exists()) {
      filePaths.add(path);
      fileFilters.add(filt);
    } else {
      System.err.printf("%s: File/path %s does not exist. Skipping.\n" , this.getClass().getName(), path.getPath());
    }
  }
1074616
public void loadVfsEntryBean(
        final String siteRoot,
        final String filter,

        final AsyncCallback<CmsVfsEntryBean> asyncCallback) {

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

            @Override
            public void execute() {

                start(200, false);
                getGalleryService().loadVfsEntryBean(siteRoot, filter, this);
            }

            @Override
            public void onResponse(CmsVfsEntryBean result) {

                stop(false);
                asyncCallback.onSuccess(result);
            }

        };
        action.execute();
    }
601642
public boolean load(String path, List<V> value)
    {
        if (!loadBaseAndCheck(path)) return false;
        v = (V[]) value.toArray();
        return true;
    }
71065
function setRoot(mountpath) {

    // mount to root if not mountpath
    let root=mountpath?mountpath:"";
    // add leading slash if needed
    root=root.match(/^\/.*/)?root:`/${root}`;
    // chop off trailing slash
    root=root.match(/^.*\/$/)?root.substring(0,root.length-1):root; 
    // if root is just slash then mountpath is empty (load on root of site)
    root=root.length>1?root:"";
    return root;
}
965732
public static Collection<String> listFiles(ClassLoader classLoader, String rootPath) {
    return listResources(classLoader, rootPath, path -> !StringUtils.endsWith(path, "/"));
  }
390719
public static Path getRootPath(Path path) {
    if (path.isRoot()) {
      return path;
    }
    return getRootPath(path.getParent());
  }