FileSystem.Selector
- Inheritance
ObjectSelector
- Enclosing type
FileSystem
A selector for determining which FileSystem should handle operations on a given Path. This class encapsulates a FileSystem and defines a condition for selecting it.
Constructors1
Selector(FileSystem)
Selector
since 24.2protected Selector(FileSystem fileSystem)Creates a Selector for the specified FileSystem.
Parameters
fileSystemFileSystem- No description.
Methods3
FileSystem getFileSystem()
getFileSystem
since 24.2public final FileSystem getFileSystem()Returns the FileSystem associated with this selector.
Returns
FileSystem- No description.
boolean test(Path)
test
abstractsince 24.2public abstract boolean test(Path path)Tests whether the FileSystem associated with this selector can handle operations on the specified Path.
Parameters
pathPath- the path to test, provided as a normalized absolute path. The given
pathhas no path components equal to"."or"..".
Returns
booleantrueif the associatedFileSystemcan handle thepath;falseotherwise
Overrides test(T).
static FileSystem.Selector of(FileSystem, Predicate<Path>)
of
staticsince 24.2public static FileSystem.Selector of(FileSystem fileSystem, Predicate< Path> predicate)Creates a Selector for the specified FileSystem using the provided Predicate.
Parameters
fileSystemFileSystem- the
FileSystemto associate with the selector predicatePredicate<Path> - the condition to determine if the
FileSystemcan handle a given path
Returns
FileSystem.Selector- a new
Selectorthat delegates path testing to thepredicate