public final class JkPathMatcher
extends java.lang.Object
implements java.nio.file.PathMatcher
Modifier and Type | Method and Description |
---|---|
JkPathMatcher |
and(boolean positive,
java.nio.file.FileSystem fileSystem,
java.lang.String... patterns) |
JkPathMatcher |
and(boolean positive,
java.lang.String... patterns) |
JkPathMatcher |
and(java.nio.file.PathMatcher other) |
boolean |
matches(java.nio.file.Path path) |
static JkPathMatcher |
of()
A matcher accepting all entries.
|
static JkPathMatcher |
of(boolean positive,
java.nio.file.FileSystem fileSystem,
java.lang.Iterable<java.lang.String> globPatterns)
A matcher accepting/refusing if path matches at least one of the specified glob patterns within specified file system.
|
static JkPathMatcher |
of(boolean positive,
java.nio.file.FileSystem fileSystem,
java.lang.String... globPattern) |
static JkPathMatcher |
of(boolean positive,
java.lang.String... globPattern) |
static JkPathMatcher |
of(java.nio.file.PathMatcher matcher)
Creates an instance from a
PathMatcher instance. |
static JkPathMatcher |
of(java.lang.String... globPatterns)
Shorthand for
of(true, patterns) . |
static JkPathMatcher |
ofNoDirectory(java.nio.file.LinkOption... linkOptions)
A matcher filtering out directories.
|
JkPathMatcher |
or(java.nio.file.PathMatcher other) |
java.util.function.Predicate<java.nio.file.Path> |
toPredicate()
Returns this matcher as a
Predicate |
java.lang.String |
toString() |
public static JkPathMatcher of(java.nio.file.PathMatcher matcher)
PathMatcher
instance.public static JkPathMatcher of()
public static JkPathMatcher ofNoDirectory(java.nio.file.LinkOption... linkOptions)
public static JkPathMatcher of(boolean positive, java.nio.file.FileSystem fileSystem, java.lang.String... globPattern)
of(boolean, FileSystem, Iterable)
public static JkPathMatcher of(java.lang.String... globPatterns)
of(true, patterns)
.public static JkPathMatcher of(boolean positive, java.lang.String... globPattern)
of(boolean, FileSystem, Iterable)
public static JkPathMatcher of(boolean positive, java.nio.file.FileSystem fileSystem, java.lang.Iterable<java.lang.String> globPatterns)
positive
- If true
matcher will accept files matching at least one of the specified patterns.
If false
matcher will accept files matching none of the specified pattern.public java.lang.String toString()
toString
in class java.lang.Object
public java.util.function.Predicate<java.nio.file.Path> toPredicate()
Predicate
public boolean matches(java.nio.file.Path path)
matches
in interface java.nio.file.PathMatcher
public JkPathMatcher and(java.nio.file.PathMatcher other)
public JkPathMatcher or(java.nio.file.PathMatcher other)
public JkPathMatcher and(boolean positive, java.nio.file.FileSystem fileSystem, java.lang.String... patterns)
public JkPathMatcher and(boolean positive, java.lang.String... patterns)