public class FileTreeUtil
extends java.lang.Object
FileTree and manage paths.| Constructor and Description |
|---|
FileTreeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.rundeck.storage.api.ContentMeta> |
forRoot(java.io.File root,
org.rundeck.storage.api.ContentFactory<T> factory) |
static org.rundeck.storage.api.Path |
pathForFileInRoot(java.io.File rootDir,
java.io.File file)
Return a storage Path given a file within a given root dir
|
static org.rundeck.storage.api.Path |
pathForRelativeFilepath(java.lang.String filepath)
Return a storage path given a relative file path string, using the native file path
separator.
|
static org.rundeck.storage.api.Path |
pathForRelativeFilepath(java.lang.String filepath,
java.lang.String separator)
Return a storage path given a relative file path string
|
public static <T extends org.rundeck.storage.api.ContentMeta> FileTree<T> forRoot(java.io.File root, org.rundeck.storage.api.ContentFactory<T> factory)
public static org.rundeck.storage.api.Path pathForFileInRoot(java.io.File rootDir,
java.io.File file)
rootDir - root dir to usefile - filejava.lang.IllegalArgumentException - if the file is not within the rootpublic static org.rundeck.storage.api.Path pathForRelativeFilepath(java.lang.String filepath)
filepath - file path with native file separatorpublic static org.rundeck.storage.api.Path pathForRelativeFilepath(java.lang.String filepath,
java.lang.String separator)
filepath - file path with given separatorseparator - separator string