public interface Scanner
Modifier and Type | Method and Description |
---|---|
void |
addDefaultExcludes()
Adds default exclusions to the current exclusions set.
|
java.io.File |
getBasedir()
Returns the base directory to be scanned.
|
java.lang.String[] |
getIncludedDirectories()
Returns the names of the directories which matched at least one of the include patterns and none of the exclude
patterns.
|
java.lang.String[] |
getIncludedFiles()
Returns the names of the files which matched at least one of the include patterns and none of the exclude
patterns.
|
void |
scan()
Scans the base directory for files which match at least one include pattern and don't match any exclude patterns.
|
void |
setExcludes(java.lang.String[] excludes)
Sets the list of exclude patterns to use.
|
void |
setFilenameComparator(java.util.Comparator<java.lang.String> filenameComparator)
Use a filename comparator in each directory when scanning.
|
void |
setIncludes(java.lang.String[] includes)
Sets the list of include patterns to use.
|
void setIncludes(java.lang.String[] includes)
File.separatorChar
, so the separator used need not match File.separatorChar
.
When a pattern ends with a '/' or '\', "**" is appended.
includes
- A list of include patterns. May be null
, indicating that all files should be
included. If a non-null
list is given, all elements must be non-null
.void setExcludes(java.lang.String[] excludes)
File.separatorChar
, so the separator used need not match File.separatorChar
.
When a pattern ends with a '/' or '\', "**" is appended.
excludes
- A list of exclude patterns. May be null
, indicating that no files should be
excluded. If a non-null
list is given, all elements must be non-null
.void addDefaultExcludes()
void scan()
java.lang.IllegalStateException
- if the base directory was set incorrectly (i.e. if it is null
,
doesn't exist, or isn't a directory).java.lang.String[] getIncludedFiles()
java.lang.String[] getIncludedDirectories()
java.io.File getBasedir()
void setFilenameComparator(java.util.Comparator<java.lang.String> filenameComparator)
filenameComparator
-