Package org.esa.snap.core.util.io
Class WildcardMatcher
- java.lang.Object
-
- org.esa.snap.core.util.io.WildcardMatcher
-
public class WildcardMatcher extends Object
Utility class that can be used to "glob" the filesystem using (extended) Unix-style wildcards:- '**' recursively matches directories and sub-directories;
- '*' matches parts or entire path names;
- '?' matches single characters;
- and character ranges expressed with '[]' will be correctly matched.
- Since:
- BEAM 4.10
- See Also:
- Patterns in the Ant documentation
-
-
Constructor Summary
Constructors Constructor Description WildcardMatcher(String wildcard)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static File[]
glob(String filePattern)
static void
glob(String filePattern, Set<File> fileSet)
boolean
matches(String text)
-
-
-
Constructor Detail
-
WildcardMatcher
public WildcardMatcher(String wildcard)
-
-
Method Detail
-
glob
public static File[] glob(String filePattern) throws IOException
- Throws:
IOException
-
glob
public static void glob(String filePattern, Set<File> fileSet) throws IOException
- Throws:
IOException
-
matches
public boolean matches(String text)
-
-