Elide GraalVM25.6.0-elide.4
All types
Versions and modules

FileSystem.Selector

Javaabstract classin org.graalvm.polyglot.iosince 24.2

public abstract class FileSystem.Selector implements Predicate<Path>
Inheritance
  1. Object
  2. Selector
Implements
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.2
protected Selector(FileSystem fileSystem)

Creates a Selector for the specified FileSystem.

Parameters

fileSystemFileSystem
No description.

Methods3

FileSystem getFileSystem()

getFileSystem

since 24.2
public final FileSystem getFileSystem()

Returns the FileSystem associated with this selector.

Returns

FileSystem
No description.
boolean test(Path)

test

abstractsince 24.2
public 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 path has no path components equal to "." or "..".

Returns

boolean
true if the associated FileSystem can handle the path; false otherwise

Overrides test(T).

static FileSystem.Selector of(FileSystem, Predicate<Path>)

of

staticsince 24.2
public static FileSystem.Selector of(FileSystem fileSystem, Predicate<Path> predicate)

Creates a Selector for the specified FileSystem using the provided Predicate.

Parameters

fileSystemFileSystem
the FileSystem to associate with the selector
predicatePredicate<Path>
the condition to determine if the FileSystem can handle a given path

Returns

FileSystem.Selector
a new Selector that delegates path testing to the predicate

Inherited members

From interface Predicate

and, negate, or