public class RemotePath
extends java.lang.Object
implements org.eclipse.core.runtime.IPath, java.lang.Cloneable
org.eclipse.core.runtime.Path.
Cloned from org.eclipse.equinox.common. This class should be removed when
Eclipse older than Mars no longer needs to be supported.Path| Modifier and Type | Field and Description |
|---|---|
static RemotePath |
EMPTY
Constant value containing the empty path with no device on the local file system.
|
static RemotePath |
ROOT
Constant value containing the root path with no device on the local file system.
|
| Constructor and Description |
|---|
RemotePath(java.lang.String fullPath)
Constructs a new path from the given string path.
|
RemotePath(java.lang.String device,
java.lang.String path)
Constructs a new path from the given device id and string path.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.core.runtime.IPath |
addFileExtension(java.lang.String extension) |
org.eclipse.core.runtime.IPath |
addTrailingSeparator() |
org.eclipse.core.runtime.IPath |
append(org.eclipse.core.runtime.IPath tail) |
org.eclipse.core.runtime.IPath |
append(java.lang.String tail) |
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
static RemotePath |
forPosix(java.lang.String fullPath)
Constructs a new POSIX path from the given string path.
|
static RemotePath |
forWindows(java.lang.String fullPath)
Constructs a new Windows path from the given string path.
|
static org.eclipse.core.runtime.IPath |
fromOSString(java.lang.String pathString)
Constructs a new path from the given string path.
|
static org.eclipse.core.runtime.IPath |
fromPortableString(java.lang.String pathString)
Constructs a new path from the given path string.
|
java.lang.String |
getDevice() |
java.lang.String |
getFileExtension() |
int |
hashCode() |
boolean |
hasTrailingSeparator() |
boolean |
isAbsolute() |
boolean |
isEmpty() |
boolean |
isPrefixOf(org.eclipse.core.runtime.IPath anotherPath) |
boolean |
isRoot() |
boolean |
isUNC() |
boolean |
isValidPath(java.lang.String path) |
static boolean |
isValidPosixPath(java.lang.String path)
Returns whether the given string is syntactically correct as a path on a
POSIX file system.
|
static boolean |
isValidPosixSegment(java.lang.String segment)
Returns whether the given string is valid as a segment in a path on a
POSIX file system.
|
boolean |
isValidSegment(java.lang.String segment) |
static boolean |
isValidWindowsPath(java.lang.String path)
Returns whether the given string is syntactically correct as a path on
the Windows file system.
|
static boolean |
isValidWindowsSegment(java.lang.String segment)
Returns whether the given string is valid as a segment in a path on the
Windows file system.
|
java.lang.String |
lastSegment() |
org.eclipse.core.runtime.IPath |
makeAbsolute() |
org.eclipse.core.runtime.IPath |
makeRelative() |
org.eclipse.core.runtime.IPath |
makeRelativeTo(org.eclipse.core.runtime.IPath base) |
org.eclipse.core.runtime.IPath |
makeUNC(boolean toUNC) |
int |
matchingFirstSegments(org.eclipse.core.runtime.IPath anotherPath) |
org.eclipse.core.runtime.IPath |
removeFileExtension() |
org.eclipse.core.runtime.IPath |
removeFirstSegments(int count) |
org.eclipse.core.runtime.IPath |
removeLastSegments(int count) |
org.eclipse.core.runtime.IPath |
removeTrailingSeparator() |
java.lang.String |
segment(int index) |
int |
segmentCount() |
java.lang.String[] |
segments() |
org.eclipse.core.runtime.IPath |
setDevice(java.lang.String value) |
java.io.File |
toFile() |
java.lang.String |
toOSString() |
java.lang.String |
toPortableString() |
java.lang.String |
toString() |
org.eclipse.core.runtime.IPath |
uptoSegment(int count) |
public static final RemotePath EMPTY
public static final RemotePath ROOT
public RemotePath(java.lang.String fullPath)
fullPath - the string pathisValidPath(String)public RemotePath(java.lang.String device,
java.lang.String path)
device - the device idpath - the string pathisValidPath(String),
setDevice(String)public static org.eclipse.core.runtime.IPath fromOSString(java.lang.String pathString)
pathString - the portable string pathIPath.toPortableString()public static org.eclipse.core.runtime.IPath fromPortableString(java.lang.String pathString)
IPath.toPortableString.pathString - the portable path stringIPath.toPortableString()public static RemotePath forPosix(java.lang.String fullPath)
fullPath - the string pathisValidPosixPath(String)public static RemotePath forWindows(java.lang.String fullPath)
fullPath - the string pathisValidWindowsPath(String)public org.eclipse.core.runtime.IPath addFileExtension(java.lang.String extension)
addFileExtension in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath addTrailingSeparator()
addTrailingSeparator in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath append(org.eclipse.core.runtime.IPath tail)
append in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath append(java.lang.String tail)
append in interface org.eclipse.core.runtime.IPathpublic java.lang.Object clone()
clone in interface org.eclipse.core.runtime.IPathclone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface org.eclipse.core.runtime.IPathequals in class java.lang.Objectpublic java.lang.String getDevice()
getDevice in interface org.eclipse.core.runtime.IPathpublic java.lang.String getFileExtension()
getFileExtension in interface org.eclipse.core.runtime.IPathpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean hasTrailingSeparator()
hasTrailingSeparator in interface org.eclipse.core.runtime.IPathpublic boolean isAbsolute()
isAbsolute in interface org.eclipse.core.runtime.IPathpublic boolean isEmpty()
isEmpty in interface org.eclipse.core.runtime.IPathpublic boolean isPrefixOf(org.eclipse.core.runtime.IPath anotherPath)
isPrefixOf in interface org.eclipse.core.runtime.IPathpublic boolean isRoot()
isRoot in interface org.eclipse.core.runtime.IPathpublic boolean isUNC()
isUNC in interface org.eclipse.core.runtime.IPathpublic boolean isValidPath(java.lang.String path)
isValidPath in interface org.eclipse.core.runtime.IPathpublic static boolean isValidPosixPath(java.lang.String path)
path - the path to checktrue if the given string is a valid path,
and false otherwiseisValidPosixSegment(String)public static boolean isValidWindowsPath(java.lang.String path)
path - the path to checktrue if the given string is a valid path,
and false otherwiseisValidWindowsSegment(String)public boolean isValidSegment(java.lang.String segment)
isValidSegment in interface org.eclipse.core.runtime.IPathpublic static boolean isValidPosixSegment(java.lang.String segment)
segment - the path segment to checktrue if the given path segment is valid,
and false otherwisepublic static boolean isValidWindowsSegment(java.lang.String segment)
segment - the path segment to checktrue if the given path segment is valid,
and false otherwisepublic java.lang.String lastSegment()
lastSegment in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath makeAbsolute()
makeAbsolute in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath makeRelative()
makeRelative in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath makeRelativeTo(org.eclipse.core.runtime.IPath base)
makeRelativeTo in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath makeUNC(boolean toUNC)
makeUNC in interface org.eclipse.core.runtime.IPathpublic int matchingFirstSegments(org.eclipse.core.runtime.IPath anotherPath)
matchingFirstSegments in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath removeFileExtension()
removeFileExtension in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath removeFirstSegments(int count)
removeFirstSegments in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath removeLastSegments(int count)
removeLastSegments in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath removeTrailingSeparator()
removeTrailingSeparator in interface org.eclipse.core.runtime.IPathpublic java.lang.String segment(int index)
segment in interface org.eclipse.core.runtime.IPathpublic int segmentCount()
segmentCount in interface org.eclipse.core.runtime.IPathpublic java.lang.String[] segments()
segments in interface org.eclipse.core.runtime.IPathpublic org.eclipse.core.runtime.IPath setDevice(java.lang.String value)
setDevice in interface org.eclipse.core.runtime.IPathpublic java.io.File toFile()
toFile in interface org.eclipse.core.runtime.IPathpublic java.lang.String toOSString()
toOSString in interface org.eclipse.core.runtime.IPathpublic java.lang.String toPortableString()
toPortableString in interface org.eclipse.core.runtime.IPathpublic java.lang.String toString()
toString in interface org.eclipse.core.runtime.IPathtoString in class java.lang.Objectpublic org.eclipse.core.runtime.IPath uptoSegment(int count)
uptoSegment in interface org.eclipse.core.runtime.IPath