|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.common.utils.Path
public class Path
Constructor Summary | |
---|---|
Path(java.lang.String fullPath)
Constructs a new path from the given string path. |
Method Summary | |
---|---|
Path |
addFileExtension(java.lang.String extension)
|
Path |
addTrailingSeparator()
|
Path |
append(Path tail)
|
Path |
append(java.lang.String tail)
|
static Path |
createFromAbsolutePath(java.lang.String path)
Creates a path object from an absolute and canonical path. |
static Path |
createFromSegments(java.lang.String[] segments)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getFileExtension()
|
static java.lang.String |
getFileNameFromPath(java.lang.String iconPath)
Gets the name of the icon file so that it can be displayed as alt text. |
int |
hashCode()
|
boolean |
hasTrailingSeparator()
|
boolean |
isAbsolute()
|
boolean |
isEmpty()
|
boolean |
isPrefixOf(Path anotherPath)
|
boolean |
isRoot()
|
static boolean |
isValidPath(java.lang.String path)
|
java.lang.String |
lastSegment()
|
Path |
makeAbsolute()
|
Path |
makeRelative()
|
int |
matchingFirstSegments(Path anotherPath)
|
Path |
removeFileExtension()
|
Path |
removeFirstSegments(int count)
|
Path |
removeLastSegments(int count)
|
Path |
removeTrailingSeparator()
|
java.lang.String |
segment(int index)
|
int |
segmentCount()
|
java.lang.String[] |
segments()
|
java.lang.String |
toString()
|
Path |
uptoSegment(int count)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Path(java.lang.String fullPath)
The string path must represent a valid file system path on the local file system.
The path is canonicalized and double slashes are removed except at the beginning. (to handle UNC paths). All forward slashes ('/') are treated as segment delimiters, and any segment and device delimiters for the local file system are also respected (such as colon (':') and backslash ('\') on some file systems).
fullPath
- the string pathisValidPath(String)
Method Detail |
---|
public static Path createFromAbsolutePath(java.lang.String path)
This method does not check the given path - it assumes the path has a valid format of the form "/a/b/c" without duplicate slashes or dots.
public static Path createFromSegments(java.lang.String[] segments)
public Path addFileExtension(java.lang.String extension)
public Path addTrailingSeparator()
public Path append(Path tail)
public Path append(java.lang.String tail)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getFileExtension()
public boolean hasTrailingSeparator()
public boolean isAbsolute()
public boolean isEmpty()
public boolean isPrefixOf(Path anotherPath)
public boolean isRoot()
public static boolean isValidPath(java.lang.String path)
public java.lang.String lastSegment()
public Path makeAbsolute()
public Path makeRelative()
public int matchingFirstSegments(Path anotherPath)
public Path removeFileExtension()
public Path removeFirstSegments(int count)
public Path removeLastSegments(int count)
public Path removeTrailingSeparator()
public java.lang.String segment(int index)
public int segmentCount()
public java.lang.String[] segments()
public java.lang.String toString()
toString
in class java.lang.Object
public Path uptoSegment(int count)
public static java.lang.String getFileNameFromPath(java.lang.String iconPath)
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |