Codota Logo
PathUtil.appendPath
Code IndexAdd Codota to your IDE (free)

How to use
appendPath
method
in
org.rundeck.storage.api.PathUtil

Best Java code snippets using org.rundeck.storage.api.PathUtil.appendPath (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.rundeck/rundeck-storage-conf

/**
 * convert internal path to external
 *
 * @param intpath
 *
 * @return
 */
private String translatePathExternal(String intpath) {
  if (fullPath) {
    return intpath;
  } else {
    return PathUtil.appendPath(rootPath.getPath(), intpath);
  }
}
origin: org.rundeck/rundeck-storage-api

/**
 * Append one path to another
 *
 * @param prefix  prefix
 * @param subpath sub path
 *
 * @return sub path appended to the prefix
 */
public static Path appendPath(Path prefix, String subpath) {
  return asPath(appendPath(prefix.getPath(), subpath));
}
origin: org.rundeck/rundeck-storage-data

private DirRes<T> createParentPaths(Path path) {
  String[] split = path.getPath().split("/");
  DirRes<T> current = root;
  Path currentPath = PathUtil.asPath("");
  for (int i = 0; i < split.length - 1; i++) {
    currentPath = PathUtil.appendPath(currentPath, split[i]);
    if (!index.containsKey(currentPath)) {
      DirRes<T> newDir = new DirRes<T>(currentPath);
      newDir.dir = true;
      current.dirList.put(currentPath, newDir);
      index.put(currentPath, newDir);
      current = newDir;
    } else {
      current = index.get(currentPath);
    }
  }
  return current;
}
origin: org.rundeck/rundeck-storage-conf

/**
 * List all treeHandlers as directories which have the given path as a parent
 * @param path path
 * @return
 */
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;
}
org.rundeck.storage.apiPathUtilappendPath

Javadoc

Append one path to another

Popular methods of PathUtil

  • asPath
  • isRoot
  • hasRoot
  • componentsFromPathString
  • parentPath
  • resourceSelector
    Return a ResourceSelector constructed using this selector syntax: key OP value [; key OP value]
  • allResourceSelector
    A resource selector which always matches
  • allpathSelector
  • cleanPath
    Clean the path string by removing leading and trailing slashes and removing duplicate slashes.
  • composeSelector
    compose two selectors
  • equals
  • exactMetadataResourceSelector
    A resource selector which requires metadata values to be equal to some required strings
  • equals,
  • exactMetadataResourceSelector,
  • join,
  • parentPathString,
  • pathName,
  • pathStringFromComponents,
  • regexMetadataResourceSelector,
  • removePrefix,
  • subpathSelector

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Kernel (java.awt.image)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now