Package org.apache.hadoop.fs
Interface PathCapabilities
- All Known Implementing Classes:
AbstractFileSystem,ChecksumFileSystem,ChecksumFs,DelegateToFileSystem,FileContext,FileSystem,FilterFileSystem,FilterFs,FTPFileSystem,FtpFs,HarFileSystem,HarFs,HttpFileSystem,HttpsFileSystem,LocalFileSystem,LocalFs,RawLocalFileSystem,RawLocalFs,SFTPFileSystem,ViewFileSystem,ViewFileSystemOverloadScheme,ViewFs
public interface PathCapabilities
The Path counterpoint to
StreamCapabilities; a query to see if,
a FileSystem/FileContext instance has a specific capability under the given
path.
Other classes may also implement the interface, as desired.
See CommonPathCapabilities for the well-known capabilities.-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasPathCapability(Path path, String capability) Probe for a specific capability under the given path.
-
Method Details
-
hasPathCapability
Probe for a specific capability under the given path. If the function returnstrue, this instance is explicitly declaring that the capability is available. If the function returnsfalse, it can mean one of:- The capability is not known.
- The capability is known but it is not supported.
- The capability is known but the filesystem does not know if it is supported under the supplied path.
Implementors:
PathCapabilitiesSupportcan be used to help implement this method.- Parameters:
path- path to query the capability of.capability- non-null, non-empty string to query the path for support.- Returns:
- true if the capability is supported under that part of the FS.
- Throws:
IOException- this should not be raised, except on problems resolving paths or relaying the call.IllegalArgumentException- invalid arguments
-