Package com.helger.commons.io.file
Interface IFileFilter
- All Superinterfaces:
FileFilter,FilenameFilter,Predicate<File>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface IFileFilter
extends FileFilter, FilenameFilter, Predicate<File>
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandefault booleanstatic IFileFilterstatic IFileFilterstatic IFileFilterfilenameEndsWith(String sSuffix) static IFileFilterfilenameEquals(String sFilename) static IFileFilterfilenameEqualsIgnoreCase(String sFilename) static IFileFilterstatic IFileFilterfilenameMatchAny(String... aFilenames) Create a file filter that matches, if it matches one of the provided filenames.static IFileFilterfilenameMatchAnyRegEx(String... aRegExs) Create a file filter that matches, if it matches one of the provided regular expressionsstatic IFileFilterfilenameMatchNone(String... aFilenames) Create a file filter that matches, if it matches none of the provided filenames.static IFileFilterfilenameMatchNoRegEx(String... aRegExs) Create a file filter that matches, if it matches none of the provided regular expressionsstatic IFileFilterfilenameNotEquals(String sFilename) static IFileFilterfilenameNotEqualsIgnoreCase(String sFilename) static IFileFilterfilenameStartsWith(String sPrefix) static IFileFilterfileOnly()static IFileFilter
-
Method Details
-
accept
- Specified by:
acceptin interfaceFileFilter
-
accept
- Specified by:
acceptin interfaceFilenameFilter
-
directoryOnly
- Returns:
- The created
IFileFilter. Nevernull.
-
directoryPublic
- Returns:
- The created
IFileFilter. Nevernull.
-
parentDirectoryPublic
- Returns:
- The created
IFileFilter. Nevernull.
-
fileOnly
- Returns:
- The created
IFileFilter. Nevernull.
-
filenameHidden
- Returns:
- The created
IFileFilter. Nevernull.
-
filenameStartsWith
- Parameters:
sPrefix- The extension to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameEndsWith
- Parameters:
sSuffix- The suffix to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameEquals
- Parameters:
sFilename- The filename to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameEqualsIgnoreCase
- Parameters:
sFilename- The filename to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameNotEquals
- Parameters:
sFilename- The filename to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameNotEqualsIgnoreCase
- Parameters:
sFilename- The filename to use. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull.
-
filenameMatchAnyRegEx
Create a file filter that matches, if it matches one of the provided regular expressions- Parameters:
aRegExs- The regular expressions to match against. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull. - See Also:
-
filenameMatchNoRegEx
Create a file filter that matches, if it matches none of the provided regular expressions- Parameters:
aRegExs- The regular expressions to match against. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull. - See Also:
-
filenameMatchAny
Create a file filter that matches, if it matches one of the provided filenames.- Parameters:
aFilenames- The names to match against. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull. - See Also:
-
filenameMatchNone
Create a file filter that matches, if it matches none of the provided filenames.- Parameters:
aFilenames- The filenames to match against. May neither benullnor empty.- Returns:
- The created
IFileFilter. Nevernull. - See Also:
-