com.gridsystems.utils
Class WildcardsFileFilter

java.lang.Object
  extended by com.gridsystems.utils.WildcardsFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

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

File filter using wildcards (* and ?).

Author:
Xmas

Constructor Summary
WildcardsFileFilter(java.lang.String sWild)
          Constructor.
 
Method Summary
 boolean accept(java.io.File relDir, java.lang.String name)
          
 boolean accept(java.lang.String dir, java.lang.String name)
          Tests if a specified file should be included in a file list.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WildcardsFileFilter

public WildcardsFileFilter(java.lang.String sWild)
Constructor.

Parameters:
sWild - wildcard expression.
Method Detail

accept

public boolean accept(java.lang.String dir,
                      java.lang.String name)
Tests if a specified file should be included in a file list.

Parameters:
dir - Directory in which the file was found.
name - Name of the file.
Returns:
true if and only if the name should be included in the file list; false otherwise.

accept

public boolean accept(java.io.File relDir,
                      java.lang.String name)

Specified by:
accept in interface java.io.FilenameFilter

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.