Package org.apache.commons.vfs2
Class FileTypeSelector
- java.lang.Object
-
- org.apache.commons.vfs2.FileTypeSelector
-
- All Implemented Interfaces:
FileSelector
public class FileTypeSelector extends java.lang.Object implements FileSelector
AFileSelector
that selects files of a particular type.
-
-
Constructor Summary
Constructors Constructor Description FileTypeSelector(FileType type)
Creates a new selector for the given file type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
includeFile(FileSelectInfo fileInfo)
Determines if a file or folder should be selected.boolean
traverseDescendents(FileSelectInfo fileInfo)
Determines whether a folder should be traversed.
-
-
-
Constructor Detail
-
FileTypeSelector
public FileTypeSelector(FileType type)
Creates a new selector for the given file type.- Parameters:
type
- The file type to select
-
-
Method Detail
-
includeFile
public boolean includeFile(FileSelectInfo fileInfo) throws FileSystemException
Determines if a file or folder should be selected.- Specified by:
includeFile
in interfaceFileSelector
- Parameters:
fileInfo
- The file selection information.- Returns:
- true if the file or folder should be selected.
- Throws:
FileSystemException
- if an error occurs
-
traverseDescendents
public boolean traverseDescendents(FileSelectInfo fileInfo)
Determines whether a folder should be traversed.- Specified by:
traverseDescendents
in interfaceFileSelector
- Parameters:
fileInfo
- The file selection information.- Returns:
- true if the file or folder should be traversed.
-
-