@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class FSLinkResolver<T> extends Object
FileContext to operate on and resolve
symlinks in a path. Operations can potentially span multiple
AbstractFileSystems.FileSystemLinkResolver| Constructor and Description |
|---|
FSLinkResolver() |
| Modifier and Type | Method and 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(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(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 IOException, UnresolvedLinkException
fs - AbstractFileSystem to perform the operation on.p - Path given the file system.UnresolvedLinkException - If symbolic link path could
not be resolvedIOException - an I/O error occurredpublic T resolve(FileContext fc, Path path) throws IOException
fc - FileContext used to access file systems.path - The path to resolve symlinks on.IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.