com.armatiek.infofuze.stream.filesystem.filefilter
Class DirectoryFileFilter

java.lang.Object
  extended by com.armatiek.infofuze.stream.filesystem.filefilter.DirectoryFileFilter
All Implemented Interfaces:
IOFileFilter, java.io.Serializable

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

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

DIRECTORY

public static final IOFileFilter DIRECTORY
Singleton instance of directory filter.


INSTANCE

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

accept

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

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