org.eclipse.internal.xpand2.pr.util
Class GenericFileFilter

java.lang.Object
  extended by org.eclipse.internal.xpand2.pr.util.GenericFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class GenericFileFilter
extends java.lang.Object
implements java.io.FilenameFilter

Configurable FilenameFilter. By default this filter does not accept well known files or directories managed by source control systems and temporary files.

See Also:
"http://www.cvshome.org/docs/manual/cvs-1.11.10/cvs_18.html#SEC156"

Field Summary
static java.lang.String DEFAULTIGNORELIST
           
 
Constructor Summary
GenericFileFilter()
          Creates the Filter with default excludes.
GenericFileFilter(java.lang.String aIgnoreList)
           
GenericFileFilter(java.lang.String aIgnoreList, boolean aDefaultexcludes)
           
 
Method Summary
 boolean accept(java.io.File file)
          Accept all files and directories not included in the ignore list.
 boolean accept(java.io.File dir, java.lang.String name)
          Accept all files and directories not included in the ignore list.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULTIGNORELIST

public static final java.lang.String DEFAULTIGNORELIST
See Also:
Constant Field Values
Constructor Detail

GenericFileFilter

public GenericFileFilter(java.lang.String aIgnoreList,
                         boolean aDefaultexcludes)
Parameters:
aIgnoreList - List of file patterns to ignore. This list can be comma-separated or space-separated. Note that file patterns containing commas can't be handled, since they will be recognized as two separated patterns.
aDefaultexcludes - true use the default exclude list.

GenericFileFilter

public GenericFileFilter(java.lang.String aIgnoreList)

GenericFileFilter

public GenericFileFilter()
Creates the Filter with default excludes.

Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Accept all files and directories not included in the ignore list.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - Directory to search in for a file
name - File name to check
Returns:
true when the file is accepted by the filter.

accept

public boolean accept(java.io.File file)
Accept all files and directories not included in the ignore list.

Parameters:
file - File to check
Returns:
true when the file is accepted by the filter.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object