public class AntPatternDirectoryScanner extends java.lang.Object
This class is meant to be a faster and more memory efficient replacement for ANT's DirectoryScanner.
Internally this works entirely with '/' as path separator. However, this is not visible from the outside.
Internally, the implementation uses Java's RegEx engine by translating ANT patterns to regular expressions.
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
scan(java.lang.String baseDir,
boolean caseSensitive,
java.lang.String[] includePatterns,
java.lang.String[] excludePatterns)
Performs directory scanning.
|
public static java.lang.String[] scan(java.lang.String baseDir, boolean caseSensitive, java.lang.String[] includePatterns, java.lang.String[] excludePatterns) throws java.io.IOException
baseDir
- the directory to start scanning in. All file names returned
will be relative to this file.caseSensitive
- whether pattern should be applied case sensitive or not.includePatterns
- the include pattern (use ANT's pattern syntax)excludePatterns
- the exclude pattern (use ANT's pattern syntax)java.io.IOException
- in case of invalid pattern provided.