public interface PathWrapper
Path
wrapper object, either absolute or relative.
Note this object is implemented directly for BuckUnixPath
.
Modifier and Type | Method and Description |
---|---|
default boolean |
endsWith(Path path) |
default boolean |
endsWith(String other) |
boolean |
equals(Object that) |
default boolean |
equals(Path that)
Deprecated.
|
default FileSystem |
getFileSystem() |
Path |
getPath() |
int |
hashCode() |
default boolean |
startsWith(Path other) |
String |
toString() |
Path getPath()
@Deprecated default boolean equals(Path that)
This code is incorrect:
AbsPath p1 = ...
Path p2 = ...
p1.equals(p2);
because AbsPath
and Path
are different "types" and should not be equal
according to Object.equals(Object)
contract.
This overload helps to catch this error.
default boolean endsWith(String other)
default boolean endsWith(Path path)
default FileSystem getFileSystem()
default boolean startsWith(Path other)