Package org.apache.commons.vfs2
Class FileExtensionSelector
java.lang.Object
org.apache.commons.vfs2.FileExtensionSelector
- All Implemented Interfaces:
- FileSelector
A 
FileSelector that selects based on file extensions.
 The extension comparison is case insensitive.
The selector makes a copy of a given Collection or array. Changing the object passed in the constructors will not affect the selector.
- Since:
- 2.1
- 
Constructor SummaryConstructorsConstructorDescriptionFileExtensionSelector(String... extensions) Creates a new selector for the given extensions.FileExtensionSelector(Collection<String> extensions) Creates a new selector for the given extensions.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanincludeFile(FileSelectInfo fileInfo) Determines if a file or folder should be selected.booleantraverseDescendents(FileSelectInfo fileInfo) Determines whether a folder should be traversed.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileSelectortraverseDescendants
- 
Constructor Details- 
FileExtensionSelectorCreates a new selector for the given extensions.- Parameters:
- extensions- The extensions to be included by this selector.
 
- 
FileExtensionSelectorCreates a new selector for the given extensions.- Parameters:
- extensions- The extensions to be included by this selector.
 
 
- 
- 
Method Details- 
includeFileDetermines if a file or folder should be selected.- Specified by:
- includeFilein interface- FileSelector
- Parameters:
- fileInfo- The file selection information.
- Returns:
- true if the file should be selected, false otherwise.
- Throws:
- Exception- if an error occurs.
 
- 
traverseDescendentsDetermines whether a folder should be traversed.- Specified by:
- traverseDescendentsin interface- FileSelector
- Parameters:
- fileInfo- The file selection information.
- Returns:
- true if descendants should be traversed, false otherwise.
- Throws:
- Exception- if an error occurs.
 
 
-