T - type of the returned value.@Private @Evolving public class FsLinkResolution<T> extends FSLinkResolver<T>
FileContext
link resolution.| Modifier and Type | Class | Description |
|---|---|---|
static interface |
FsLinkResolution.FsLinkResolutionFunction<T> |
The signature of the function to invoke.
|
| Constructor | Description |
|---|---|
FsLinkResolution(FsLinkResolution.FsLinkResolutionFunction<T> fn) |
Construct an instance with the given function.
|
| Modifier and Type | Method | Description |
|---|---|---|
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 <T> T |
resolve(FileContext fileContext,
Path path,
FsLinkResolution.FsLinkResolutionFunction<T> fn) |
Apply the given function to the resolved path under the the supplied
FileContext.
|
qualifySymlinkTarget, resolvepublic FsLinkResolution(FsLinkResolution.FsLinkResolutionFunction<T> fn)
fn - function to invoke.public T next(AbstractFileSystem fs, Path p) throws UnresolvedLinkException, java.io.IOException
FSLinkResolvernext in class FSLinkResolver<T>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 static <T> T resolve(FileContext fileContext, Path path, FsLinkResolution.FsLinkResolutionFunction<T> fn) throws UnresolvedLinkException, java.io.IOException
T - return type.fileContext - file context to resolve underpath - path to resolvefn - function to invokeUnresolvedLinkException - link resolution failurejava.io.IOException - other IO failure.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.