public abstract class BuckUnixPath extends Object implements Path, PathWrapper
| Modifier and Type | Class and Description |
|---|---|
static class |
BuckUnixPath.InternalsForFastPaths
Top-secret internal accessors for use in
FastPaths. |
| Modifier | Constructor and Description |
|---|---|
protected |
BuckUnixPath(BuckFileSystem fs,
String[] segments) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorequalsprotected BuckUnixPath(BuckFileSystem fs, String[] segments)
public static BuckUnixPath of(BuckFileSystem fs, String path)
fs - Filesystem that created this instancepath - String representation of a pathpublic boolean isEmpty()
true if this path is an empty pathpublic BuckUnixPath emptyPath()
public FileSystem getFileSystem()
getFileSystem in interface PathWrappergetFileSystem in interface Pathpublic Path getFileName()
getFileName in interface Pathpublic int getNameCount()
getNameCount in interface Pathpublic String[] getSegmentsUnsafe()
ForwardRelativePath implementation.public BuckUnixPath subpath(int beginIndex, int endIndex)
public boolean isAbsolute()
isAbsolute in interface Pathpublic Path resolveSibling(Path other)
resolveSibling in interface Pathpublic Path resolveSibling(String other)
resolveSibling in interface Pathpublic Path relativize(Path obj)
relativize in interface Pathpublic int compareTo(Path other)
compareTo in interface Comparable<Path>compareTo in interface Pathpublic boolean startsWith(Path other)
startsWith in interface PathWrapperstartsWith in interface Pathpublic boolean endsWith(Path other)
endsWith in interface PathWrapperendsWith in interface Pathpublic boolean startsWith(String other)
startsWith in interface Pathpublic boolean endsWith(String other)
endsWith in interface PathWrapperendsWith in interface Pathpublic boolean equals(Object ob)
public int hashCode()
public String toString()
public Path toAbsolutePath()
toAbsolutePath in interface Pathpublic Path toRealPath(LinkOption... options) throws IOException
toRealPath in interface PathIOExceptionpublic WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException
register in interface Pathregister in interface WatchableIOExceptionpublic WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException
register in interface Pathregister in interface WatchableIOExceptionpublic Path getPath()
getPath in interface PathWrapper