Package net.shibboleth.metadata.util
Class RegexFileFilter
java.lang.Object
net.shibboleth.metadata.util.RegexFileFilter
- All Implemented Interfaces:
FileFilter
A
FileFilter implementation that selects files on the basis of a regular expression match against the file
name.- Since:
- 0.10.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
pattern
Compiled regular expression.
-
-
Constructor Details
-
RegexFileFilter
Constructor.- Parameters:
regex- Regular expression to match file names against.
-
-
Method Details
-
accept
Matches the regular expression against the last file name component of the suppliedFileobject. As the whole of the name is being matched against, it is not necessary for the regular expression to contain anchor characters such as '^' and '$'.- Specified by:
acceptin interfaceFileFilter- Parameters:
pathname-Fileto match against the regular expression.- Returns:
trueiffpathnamematches the regular expression.
-