public class PatternFileSelector extends Object implements FileSelector
FileSelector that selects based on regular expressions matched against base filename.| Constructor and Description |
|---|
PatternFileSelector(Pattern pattern)
Creates a new selector for the given pattern.
|
PatternFileSelector(String regex)
Creates a new selector for the given pattern.
|
PatternFileSelector(String regex,
int flags)
Creates a new selector for the given Pattern and flags.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
includeFile(FileSelectInfo fileInfo)
Determines if a file or folder should be selected.
|
String |
toString() |
boolean |
traverseDescendents(FileSelectInfo fileInfo)
Determines whether a folder should be traversed.
|
public PatternFileSelector(Pattern pattern)
pattern - The regular expressed used by this selector.public PatternFileSelector(String regex)
regex - The regular expressed used by this selector.public PatternFileSelector(String regex, int flags)
regex - The expression to be compiledflags - Match flags, a bit mask.Pattern.compile(String, int)public boolean includeFile(FileSelectInfo fileInfo)
includeFile in interface FileSelectorfileInfo - The file selection information.public boolean traverseDescendents(FileSelectInfo fileInfo)
traverseDescendents in interface FileSelectorfileInfo - The file selection information.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.