Class FileTypeSelector

java.lang.Object
org.apache.commons.vfs2.FileTypeSelector
All Implemented Interfaces:
FileSelector

public class FileTypeSelector extends Object implements FileSelector
A FileSelector that selects files of a particular type.
  • Field Details

    • type

      private final FileType type
      The FileType
  • Constructor Details

    • FileTypeSelector

      public FileTypeSelector(FileType type)
      Creates a new selector for the given file type.
      Parameters:
      type - The file type to select
  • Method Details

    • includeFile

      public boolean includeFile(FileSelectInfo fileInfo) throws Exception
      Determines if a file or folder should be selected.
      Specified by:
      includeFile in interface FileSelector
      Parameters:
      fileInfo - The file selection information.
      Returns:
      true if the file or folder should be selected.
      Throws:
      FileSystemException - if an error occurs
      Exception - if an error occurs.
    • traverseDescendents

      public boolean traverseDescendents(FileSelectInfo fileInfo) throws Exception
      Determines whether a folder should be traversed.
      Specified by:
      traverseDescendents in interface FileSelector
      Parameters:
      fileInfo - The file selection information.
      Returns:
      true if the file or folder should be traversed.
      Throws:
      Exception - if an error occurs.