public interface AbsPath extends PathWrapper
Modifier and Type | Method and Description |
---|---|
static Comparator<AbsPath> |
comparator()
We cannot implement
Comparable directly. |
static AbsPath |
get(String path) |
default AbsPath |
getParent() |
default AbsPath |
getRoot()
Get the filesystem root of the current path.
|
default AbsPath |
normalize()
Behaves exactly like
Path.normalize() . |
static AbsPath |
of(Path path)
Cosnstruct using
Path object. |
default RelPath |
relativize(AbsPath other) |
default RelPath |
relativize(Path other) |
default AbsPath |
resolve(Path path) |
default AbsPath |
resolve(RelPath other) |
default AbsPath |
resolve(String path) |
default boolean |
startsWith(AbsPath path) |
default File |
toFile() |
default AbsPath |
toRealPath(LinkOption... options) |
endsWith, endsWith, equals, equals, getFileSystem, getPath, hashCode, startsWith, toString
static AbsPath of(Path path)
Path
object.
Note this operation is just a cast if the path is BuckUnixPath
.
RuntimeException
- the path is not absolute.default AbsPath normalize()
Path.normalize()
.default AbsPath toRealPath(LinkOption... options) throws IOException
IOException
default boolean startsWith(AbsPath path)
default AbsPath getParent()
default AbsPath getRoot()
Path.getRoot()
this function
never returns null
because absolute paths always have root.default File toFile()
static Comparator<AbsPath> comparator()
Comparable
directly.