Class DirectoryFileFilter

  extended by
All Implemented Interfaces:

public class DirectoryFileFilter
extends java.lang.Object
implements IOFileFilter,

This filter accepts Files that are directories. Based on code from Apache Commons IO version 2.01. The main difference is that this class filters objects that implement FileIf, not File. Original authors Stephen Colebourne, Peter Donald

See Also:
Serialized Form

Field Summary
static IOFileFilter DIRECTORY
          Singleton instance of directory filter.
static IOFileFilter INSTANCE
          Singleton instance of directory filter.
Method Summary
 boolean accept(FileIf file)
          Checks to see if the file is a directory.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final IOFileFilter DIRECTORY
Singleton instance of directory filter.


public static final IOFileFilter INSTANCE
Singleton instance of directory filter. Please use the identical DirectoryFileFilter.DIRECTORY constant. The new name is more JDK 1.5 friendly as it doesn't clash with other values when using static imports.

Method Detail


public boolean accept(FileIf file)
Checks to see if the file is a directory.

Specified by:
accept in interface IOFileFilter
file - the File to check
true if the file is a directory