public class Glob extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<File> |
ALPHABETICAL_COMPARATOR |
| Modifier and Type | Method and Description |
|---|---|
static void |
exclude(List<File> matches,
String globPattern) |
static void |
excludeAll(List<File> matches,
List<String> globPatterns) |
static void |
excludeAll(List<File> matches,
String... globPattern) |
static boolean |
isWildcard(String globPattern)
Checks whether the provided string is a wildcard glob pattern.
|
static List<File> |
match(File parentPath,
String globPattern)
This is an overloaded version of the
match(File, String, Comparator) method
that passes null as the comparator to use. |
static List<File> |
match(File parentPath,
String globPattern,
Comparator<? super File> resultComparator)
Returns a fixed size list of matches.
|
static List<File> |
matchAll(File parentPath,
List<String> globPatterns)
This is an overloaded version of the
matchAll(File, List, Comparator) method
that passes null as the comparator to use. |
static List<File> |
matchAll(File parentPath,
List<String> globPatterns,
Comparator<? super File> resultComparator) |
static boolean |
matches(File rootPath,
String globPattern,
File file)
Checks if the file matches the glob pattern with given path as a root of the filesystem.
|
static String |
rootPortion(String path) |
public static final Comparator<File> ALPHABETICAL_COMPARATOR
public static boolean isWildcard(String globPattern)
globPattern - public static boolean matches(File rootPath, String globPattern, File file)
rootPath - globPattern - file - public static List<File> match(File parentPath, String globPattern)
match(File, String, Comparator) method
that passes null as the comparator to use.match(File, String, Comparator)public static List<File> match(File parentPath, String globPattern, Comparator<? super File> resultComparator)
parentPath - the parent path to start the pattern searchglobPattern - the glob pattern to match againstresultComparator - the comparator using which to sort the results or null if no sorting is necessarypublic static List<File> matchAll(File parentPath, List<String> globPatterns)
matchAll(File, List, Comparator) method
that passes null as the comparator to use.matchAll(File, List, Comparator)public static List<File> matchAll(File parentPath, List<String> globPatterns, Comparator<? super File> resultComparator)
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.