Package org.jppf.doc

Class JPPFDirFilter

All Implemented Interfaces:
FileFilter

public class JPPFDirFilter extends AbstractFileFilter
Filter that only accepts directories. It is possible to include or excluded specific directory names, in which case the including filter is applied before the excluding one.
  • Constructor Details

    • JPPFDirFilter

      public JPPFDirFilter()
      Initialize a filter accepting all directory names except those excluded by default.
    • JPPFDirFilter

      public JPPFDirFilter(String[] includes)
      Initialize a filter accepting the specified directory names and excluding those specified by DEFAULT_EXCLUDES.
      Parameters:
      includes - the included directory names; if null all are included. Null values are ignored.
    • JPPFDirFilter

      public JPPFDirFilter(String[] includes, String[] excludes)
      Initialize a filter accepting the specified directory names and excluding the specified ones.
      Parameters:
      includes - the included directory names; if null all are included. Null values are ignored.
      excludes - the excluded directory names; if null none are excluded. Null values are ignored.
  • Method Details

    • accept

      public boolean accept(File path)
      Determine if a file is accepted.
      Parameters:
      path - the file path to check.
      Returns:
      true if the file is a directory, false otherwise.
      See Also: