Package org.apache.hadoop.fs
Class GlobPattern
java.lang.Object
org.apache.hadoop.fs.GlobPattern
A class for POSIX glob pattern with brace expansions.
-
Constructor Summary
ConstructorsConstructorDescriptionGlobPattern(String globPattern) Construct the glob pattern object with a glob pattern string -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.re2j.PatternCompile glob pattern stringcom.google.re2j.Patterncompiled()booleanbooleanMatch input against the compiled glob patternvoidSet and compile a glob pattern
-
Constructor Details
-
GlobPattern
Construct the glob pattern object with a glob pattern string- Parameters:
globPattern- the glob pattern string
-
-
Method Details
-
compiled
public com.google.re2j.Pattern compiled()- Returns:
- the compiled pattern
-
compile
Compile glob pattern string- Parameters:
globPattern- the glob pattern- Returns:
- the pattern object
-
matches
Match input against the compiled glob pattern- Parameters:
s- input chars- Returns:
- true for successful matches
-
set
Set and compile a glob pattern- Parameters:
glob- the glob pattern string
-
hasWildcard
public boolean hasWildcard()- Returns:
- true if this is a wildcard pattern (with special chars)
-