Modifier and Type | Field and Description |
---|---|
protected Path |
delegate
The underlying
Path instance. |
protected FileSystem |
fileSystem
The parent
FileSystem for this path. |
Constructor and Description |
---|
FilterPath(Path delegate,
FileSystem fileSystem)
Construct a
FilterPath with parent
fileSystem , based on the specified base path. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Path other) |
boolean |
endsWith(Path other) |
boolean |
endsWith(String other) |
boolean |
equals(Object obj) |
Path |
getDelegate()
Get the underlying wrapped path.
|
Path |
getFileName() |
FileSystem |
getFileSystem() |
Path |
getName(int index) |
int |
getNameCount() |
Path |
getParent() |
Path |
getRoot() |
int |
hashCode() |
boolean |
isAbsolute() |
Iterator<Path> |
iterator() |
Path |
normalize() |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>... events) |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>[] events,
WatchEvent.Modifier... modifiers) |
Path |
relativize(Path other) |
Path |
resolve(Path other) |
Path |
resolve(String other) |
Path |
resolveSibling(Path other) |
Path |
resolveSibling(String other) |
boolean |
startsWith(Path other) |
boolean |
startsWith(String other) |
Path |
subpath(int beginIndex,
int endIndex) |
Path |
toAbsolutePath() |
protected Path |
toDelegate(Path path)
Override this to customize the unboxing of Path
from various operations
|
File |
toFile() |
Path |
toRealPath(LinkOption... options) |
String |
toString() |
URI |
toUri() |
static Path |
unwrap(Path path)
Unwraps all
FilterPath s, returning
the innermost Path . |
protected Path |
wrap(Path other)
Override this to customize the return wrapped
path from various operations
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected final Path delegate
Path
instance.protected final FileSystem fileSystem
FileSystem
for this path.public FilterPath(Path delegate, FileSystem fileSystem)
FilterPath
with parent
fileSystem
, based on the specified base path.delegate
- specified base path.fileSystem
- parent fileSystem.public Path getDelegate()
public FileSystem getFileSystem()
getFileSystem
in interface Path
public boolean isAbsolute()
isAbsolute
in interface Path
public Path getFileName()
getFileName
in interface Path
public int getNameCount()
getNameCount
in interface Path
public boolean startsWith(Path other)
startsWith
in interface Path
public boolean startsWith(String other)
startsWith
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 other)
relativize
in interface Path
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 int compareTo(Path other)
compareTo
in interface Comparable<Path>
compareTo
in interface Path
public int hashCode()
public boolean equals(Object obj)
public static Path unwrap(Path path)
FilterPath
s, returning
the innermost Path
.
WARNING: this is exposed for testing only!
path
- specified path.protected Path wrap(Path other)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.