|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.file.FilePath
public class FilePath
Implements a class to manipulate generic file system path structures that can apply to any type of file system-like structure including Linux, Hadoop, and in future possibly Zookeeper.
| Constructor Summary | |
|---|---|
FilePath()
Construct a path with no arguments, which creates a root path. |
|
FilePath(FilePath base)
Constructs a path from an existing path. |
|
FilePath(FilePath base,
java.lang.String subpath)
Constructs a path constructed from an existing path plus a string. |
|
FilePath(java.util.List<java.lang.String> base,
boolean absolute)
Constructs a path from a list of elements and a flag to indicate whether it is absolute. |
|
FilePath(java.lang.String path)
Constructs a path from a string, which may be a full or partial path. |
|
| Method Summary | |
|---|---|
FilePath |
append(FilePath subPath)
Appends another path to end of this one. |
FilePath |
append(java.util.List<java.lang.String> subElements)
Appends 0 or more path elements to the end. |
FilePath |
append(java.lang.String subPath)
Appends a string, which may consist of one or more elements. |
java.lang.String |
element(int i)
Returns the i'th element in the path. |
java.util.List<java.lang.String> |
elements()
Returns the elements that compose the path. |
boolean |
equals(java.lang.Object other)
Returns true if the argument is a FilePath instance and denotes the same location. |
boolean |
isAbsolute()
Returns true if this is an absolute path. |
java.lang.String |
toString()
Returns a full path with leading "/" if absolute. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilePath()
public FilePath(java.lang.String path)
public FilePath(java.util.List<java.lang.String> base,
boolean absolute)
public FilePath(FilePath base)
public FilePath(FilePath base,
java.lang.String subpath)
| Method Detail |
|---|
public java.util.List<java.lang.String> elements()
public java.lang.String element(int i)
public boolean isAbsolute()
public FilePath append(java.lang.String subPath)
public FilePath append(FilePath subPath)
public FilePath append(java.util.List<java.lang.String> subElements)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||