public class ClasspathResources extends Object
| Constructor and Description |
|---|
ClasspathResources() |
| Modifier and Type | Method and Description |
|---|---|
static Iterable<String> |
getResources(String location,
Pattern pattern)
For given classpath location ('dir'), list all resources whose name matches given pattern.
|
public static Iterable<String> getResources(String location, Pattern pattern)
For given classpath location ('dir'), list all resources whose name matches given pattern.
NOTE: Location is only used here to filter out a narrow set of locations to look in, the pattern still has to match the entire resource name to be included in the result.
NOTE 2: This will only work with classloaders based on file systems: class directory or JAR. More sophisticated resource locations are not supported.
location - location on the classpath to search inpattern - the pattern to matchCopyright © 2018 Atlassian. All rights reserved.