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, wait
forEach, spliterator
equals
protected 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 PathWrapper
getFileSystem
in interface Path
public Path getFileName()
getFileName
in interface Path
public int getNameCount()
getNameCount
in interface Path
public String[] getSegmentsUnsafe()
ForwardRelativePath
implementation.public BuckUnixPath subpath(int beginIndex, int endIndex)
public boolean isAbsolute()
isAbsolute
in interface Path
public Path resolveSibling(Path other)
resolveSibling
in interface Path
public Path resolveSibling(String other)
resolveSibling
in interface Path
public Path relativize(Path obj)
relativize
in interface Path
public int compareTo(Path other)
compareTo
in interface Comparable<Path>
compareTo
in interface Path
public boolean startsWith(Path other)
startsWith
in interface PathWrapper
startsWith
in interface Path
public boolean endsWith(Path other)
endsWith
in interface PathWrapper
endsWith
in interface Path
public boolean startsWith(String other)
startsWith
in interface Path
public boolean endsWith(String other)
endsWith
in interface PathWrapper
endsWith
in interface Path
public boolean equals(Object ob)
public int hashCode()
public String toString()
public Path toAbsolutePath()
toAbsolutePath
in interface Path
public Path toRealPath(LinkOption... options) throws IOException
toRealPath
in interface Path
IOException
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException
register
in interface Path
register
in interface Watchable
IOException
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException
register
in interface Path
register
in interface Watchable
IOException
public Path getPath()
getPath
in interface PathWrapper