|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rundeck.storage.data.file.FileTreeUtil
public class FileTreeUtil
Utility to create FileTree
and manage paths.
Constructor Summary | |
---|---|
FileTreeUtil()
|
Method Summary | ||
---|---|---|
static
|
forRoot(java.io.File root,
ContentFactory<T> factory)
|
|
static Path |
pathForFileInRoot(java.io.File rootDir,
java.io.File file)
Return a storage Path given a file within a given root dir |
|
static Path |
pathForRelativeFilepath(java.lang.String filepath)
Return a storage path given a relative file path string, using the native file path separator. |
|
static Path |
pathForRelativeFilepath(java.lang.String filepath,
java.lang.String separator)
Return a storage path given a relative file path string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTreeUtil()
Method Detail |
---|
public static <T extends ContentMeta> FileTree<T> forRoot(java.io.File root, ContentFactory<T> factory)
public static Path pathForFileInRoot(java.io.File rootDir, java.io.File file)
rootDir
- root dir to usefile
- file
java.lang.IllegalArgumentException
- if the file is not within the rootpublic static Path pathForRelativeFilepath(java.lang.String filepath)
filepath
- file path with native file separator
public static Path pathForRelativeFilepath(java.lang.String filepath, java.lang.String separator)
filepath
- file path with given separatorseparator
- separator string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |