Class FileFilterSelector

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

public class FileFilterSelector extends FileDepthSelector
A FileSelector that selects all children of the given fileObject.

This is to mimic the FileFilter interface.

  • Field Details

    • fileFilter

      private final FileFilter fileFilter
      The FileFilter.
  • Constructor Details

    • FileFilterSelector

      public FileFilterSelector()
    • FileFilterSelector

      public FileFilterSelector(FileFilter fileFilter)
  • 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
      Overrides:
      includeFile in class FileDepthSelector
      Parameters:
      fileInfo - The file selection information.
      Returns:
      true if the file or folder should be included, false otherwise.
      Throws:
      Exception - if an error occurs.
    • accept

      public boolean accept(FileSelectInfo fileInfo) throws Exception
      Determines whether the file should be selected.
      Parameters:
      fileInfo - The file selection information.
      Returns:
      true if the file should be selected, false otherwise.
      Throws:
      Exception - Thrown for file system errors or illegal argument exception.