Package io.quarkus.fs.util.base
Class DelegatingPath
java.lang.Object
io.quarkus.fs.util.base.DelegatingPath
- Direct Known Subclasses:
PathWrapper
public abstract class DelegatingPath extends Object implements Path
Base Implementation of a Path delegating most operations to another Path.
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegatingPath(Path delegate) -
Method Summary
-
Field Details
-
Constructor Details
-
DelegatingPath
- Parameters:
delegate- the Path to delegate to. May not be null.
-
-
Method Details
-
unwrap
Helper method to unwrap aDelegatingPathto the specific Path implementation. Some providers do internal checks to make sure that a Path is compatible with a FS. E.g. a WindowsFileSystem only works with WindowsPaths- Parameters:
path-- Returns:
- unwrapped path, or the original one if not an instance of DelegatingPath
-
getDelegate
-
startsWith
- Specified by:
startsWithin interfacePath
-
endsWith
-
resolve
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath
-
toFile
-
register
- Specified by:
registerin interfacePath- Specified by:
registerin interfaceWatchable- Throws:
IOException
-
iterator
-
getFileSystem
- Specified by:
getFileSystemin interfacePath
-
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfacePath
-
getRoot
-
getFileName
- Specified by:
getFileNamein interfacePath
-
getParent
-
getNameCount
public int getNameCount()- Specified by:
getNameCountin interfacePath
-
getName
-
subpath
-
startsWith
- Specified by:
startsWithin interfacePath
-
endsWith
-
normalize
-
resolve
-
relativize
- Specified by:
relativizein interfacePath
-
toUri
-
toAbsolutePath
- Specified by:
toAbsolutePathin interfacePath
-
toRealPath
- Specified by:
toRealPathin interfacePath- Throws:
IOException
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException- Specified by:
registerin interfacePath- Specified by:
registerin interfaceWatchable- Throws:
IOException
-
compareTo
- Specified by:
compareToin interfaceComparable<Path>- Specified by:
compareToin interfacePath
-
toString
-
forEach
-
spliterator
- Specified by:
spliteratorin interfaceIterable<Path>
-
equals
-
hashCode
public int hashCode()
-