Home | History | Annotate | Download | only in filefilter

Lines Matching full:wildcards

27  * Filters files using the supplied wildcards.
29 * This filter selects files and directories based on one or more wildcards.
54 /** The wildcards that will be used to match filenames. */
55 private final String[] wildcards;
80 this.wildcards = new String[] { wildcard };
85 * Construct a new case-sensitive wildcard filter for an array of wildcards.
90 * @param wildcards the array of wildcards to match
93 public WildcardFileFilter(String[] wildcards) {
94 this(wildcards, null);
98 * Construct a new wildcard filter for an array of wildcards specifying case-sensitivity.
103 * @param wildcards the array of wildcards to match, not null
107 public WildcardFileFilter(String[] wildcards, IOCase caseSensitivity) {
108 if (wildcards == null) {
111 this.wildcards = wildcards;
116 * Construct a new case-sensitive wildcard filter for a list of wildcards.
118 * @param wildcards the list of wildcards to match, not null
122 public WildcardFileFilter(List<String> wildcards) {
123 this(wildcards, null);
127 * Construct a new wildcard filter for a list of wildcards specifying case-sensitivity.
129 * @param wildcards the list of wildcards to match, not null
134 public WildcardFileFilter(List<String> wildcards, IOCase caseSensitivity) {
135 if (wildcards == null) {
138 this.wildcards = wildcards.toArray(new String[wildcards.size()]);
144 * Checks to see if the filename matches one of the wildcards.
148 * @return true if the filename matches one of the wildcards
152 for (int i = 0; i < wildcards.length; i++) {
153 if (FilenameUtils.wildcardMatch(name, wildcards[i], caseSensitivity)) {
161 * Checks to see if the filename matches one of the wildcards.
164 * @return true if the filename matches one of the wildcards
169 for (int i = 0; i < wildcards.length; i++) {
170 if (FilenameUtils.wildcardMatch(name, wildcards[i], caseSensitivity)) {
187 if (wildcards != null) {
188 for (int i = 0; i < wildcards.length; i++) {
192 buffer.append(wildcards[i]);