|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.framework.adaptor.FilePath
public class FilePath
A utility class for manipulating file system paths.
This class is not intended to be subclassed by clients but may be instantiated.
Constructor Summary | |
---|---|
FilePath(java.io.File location)
Constructs a new file path from the given File object. |
|
FilePath(java.lang.String original)
Constructs a new file path from the given string path. |
Method Summary | |
---|---|
java.lang.String |
getDevice()
Returns the device for this file system path, or null if
none exists. |
java.lang.String[] |
getSegments()
Returns the segments in this path. |
boolean |
hasTrailingSlash()
Returns whether this path ends with a slash. |
boolean |
isAbsolute()
Returns whether this path is absolute (begins with a slash). |
java.lang.String |
makeRelative(FilePath base)
Returns a string representing this path as a relative to the given base path. |
java.lang.String |
toString()
Returns a string representation of this path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FilePath(java.io.File location)
location
- public FilePath(java.lang.String original)
original
- Method Detail |
---|
public java.lang.String getDevice()
null
if
none exists. The device string ends with a colon.
public java.lang.String[] getSegments()
public boolean hasTrailingSlash()
true
if the path ends with a slash, false otherwisepublic boolean isAbsolute()
true
if this path is absolute, false
otherwisepublic java.lang.String makeRelative(FilePath base)
If this path and the given path do not use the same device letter, this path's string representation is returned as is.
base
- the path this path should be made relative to
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |