public class AntPatternFileCollector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AntPatternFileCollector.ScanOption |
Constructor and Description |
---|
AntPatternFileCollector() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.io.File> |
scanDir(java.io.File baseDir,
java.lang.String[] rules,
AntPatternFileCollector.ScanOption[] options)
Ant-style files collector (supports double-stars **).
|
static java.util.List<java.io.File> |
scanDir(java.io.File baseDir,
java.lang.String[] includeRules,
java.lang.String[] excludeRules,
AntPatternFileCollector.ScanOption[] options)
Ant-style files collector (supports double-stars **).
|
static java.util.Iterator<java.io.File> |
scanDirIteratively(java.io.File baseDir,
java.lang.String[] rules,
AntPatternFileCollector.ScanOption[] options) |
static java.lang.String |
validate(java.io.File baseDir,
java.lang.String[] includePatterns,
java.lang.String[] excludePatterns,
AntPatternFileCollector.ScanOption... options)
Will not perform any scan.
|
public static java.util.List<java.io.File> scanDir(@NotNull java.io.File baseDir, @NotNull java.lang.String[] includeRules, @NotNull java.lang.String[] excludeRules, @Nullable AntPatternFileCollector.ScanOption[] options)
Ant-style files collector (supports double-stars **).
Rules:
File.isFile()
==true) are collected
By default no rules at all results in no files are collected, but if there only exclude rules,
all files except excluded ones will be collected
Available options:
a*ba.xml
is stricter than a*ba.*
,
but not a*cba.*
. baseDir
- - directory to start scan fromincludeRules
- - not null array of include rules. one string - one rule.excludeRules
- - not null array of exclude rules. one string - one rule. Exclude rules apply firstoptions
- - nullable array of options. See above for detailspublic static java.util.List<java.io.File> scanDir(@NotNull java.io.File baseDir, @NotNull java.lang.String[] rules, @Nullable AntPatternFileCollector.ScanOption[] options)
Ant-style files collector (supports double-stars **).
Rules:
File.isFile()
==true) are collected
By default no rules at all results in no files are collected, but if there only exclude rules,
all files except excluded ones will be collected
Available options:
a*ba.xml
is stricter than a*ba.*
,
but not a*cba.*
. baseDir
- - directory to start scan fromrules
- - not null array of rules. one string - one rule.options
- - nullable array of options. See above for detailspublic static java.util.Iterator<java.io.File> scanDirIteratively(@NotNull java.io.File baseDir, @NotNull java.lang.String[] rules, @Nullable AntPatternFileCollector.ScanOption[] options)
@Nullable public static java.lang.String validate(@NotNull java.io.File baseDir, @NotNull java.lang.String[] includePatterns, @NotNull java.lang.String[] excludePatterns, @Nullable AntPatternFileCollector.ScanOption... options)
Will not perform any scan. Will only check parameters returning error message if any.
includePatterns
- - not null array of include rules. one string - one rule.excludePatterns
- - not null array of exclude rules. one string - one rule. Exclude rules apply firstoptions
- - nullable array of options. See above for details