FsLinkResolution@Private
@Evolving
public abstract class FSLinkResolver<T>
extends java.lang.Object
FileContext to operate on and resolve
symlinks in a path. Operations can potentially span multiple
AbstractFileSystems.FileSystemLinkResolver| Constructor | Description |
|---|---|
FSLinkResolver() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract T |
next(AbstractFileSystem fs,
Path p) |
Generic helper function overridden on instantiation to perform a
specific operation on the given file system using the given path
which may result in an UnresolvedLinkException.
|
static Path |
qualifySymlinkTarget(java.net.URI pathURI,
Path pathWithLink,
Path target) |
Return a fully-qualified version of the given symlink target if it
has no scheme and authority.
|
T |
resolve(FileContext fc,
Path path) |
Performs the operation specified by the next function, calling it
repeatedly until all symlinks in the given path are resolved.
|
public static Path qualifySymlinkTarget(java.net.URI pathURI, Path pathWithLink, Path target)
pathURI - URI of the filesystem of pathWithLinkpathWithLink - Path that contains the symlinktarget - The symlink's absolute targetpublic abstract T next(AbstractFileSystem fs, Path p) throws java.io.IOException, UnresolvedLinkException
fs - AbstractFileSystem to perform the operation on.p - Path given the file system.UnresolvedLinkException - If symbolic link path could
not be resolvedjava.io.IOException - an I/O error occurredpublic T resolve(FileContext fc, Path path) throws java.io.IOException
fc - FileContext used to access file systems.path - The path to resolve symlinks on.java.io.IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.