org.apache.commons.finder.filters
Class PathFilter

java.lang.Object
  extended by org.apache.commons.io.filefilter.AbstractFileFilter
      extended by org.apache.commons.io.filefilter.WildcardFileFilter
          extended by org.apache.commons.finder.filters.PathFilter
All Implemented Interfaces:
java.io.FileFilter, java.io.FilenameFilter, org.apache.commons.io.filefilter.IOFileFilter

public class PathFilter
extends org.apache.commons.io.filefilter.WildcardFileFilter

IOFileFilter implementation that uses wildcard matching on the file's path.

Since:
0.1
Version:
$Id: PathFilter.java 437543 2006-08-28 05:47:51Z bayard $

Constructor Summary
PathFilter(java.lang.String wildcardmatcher, boolean ignoreCase)
          Construct a new IOFileFilter specifying whether the wildcard criteria.
 
Method Summary
 boolean accept(java.io.File file)
          Checks to see if the full filename matches the wildcard.
 boolean accept(java.io.File dir, java.lang.String name)
          Checks to see if the filename matches the wildcard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathFilter

public PathFilter(java.lang.String wildcardmatcher,
                  boolean ignoreCase)
Construct a new IOFileFilter specifying whether the wildcard criteria.

Parameters:
wildcardmatcher - the wildcard string to match against
ignoreCase - whether to ignore the case
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Checks to see if the filename matches the wildcard.

Specified by:
accept in interface java.io.FilenameFilter
Specified by:
accept in interface org.apache.commons.io.filefilter.IOFileFilter
Overrides:
accept in class org.apache.commons.io.filefilter.WildcardFileFilter
Parameters:
dir - the file directory
name - the full filename
Returns:
true if the full filename matches the wildcard

accept

public boolean accept(java.io.File file)
Checks to see if the full filename matches the wildcard.

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in interface org.apache.commons.io.filefilter.IOFileFilter
Overrides:
accept in class org.apache.commons.io.filefilter.WildcardFileFilter
Parameters:
file - the file to check
Returns:
true if the full filename matches the wildcard


Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.