twcore.core
Class SimpleFileFilter

java.lang.Object
  |
  +--twcore.core.SimpleFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

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

Class that implements the java.io.FilenameFilter interface.


Constructor Summary
SimpleFileFilter(java.lang.String ext)
           
SimpleFileFilter(java.lang.String[] exts)
           
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String _name)
          filenamefilter interface method
static java.io.File[] fileOrFiles(java.io.File f)
          this method checks to see if an asterisk is imbedded in the filename, if it is, it does an "ls" or "dir" of the parent directory returning a list of files that match eg.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFileFilter

public SimpleFileFilter(java.lang.String ext)

SimpleFileFilter

public SimpleFileFilter(java.lang.String[] exts)
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String _name)
filenamefilter interface method

Specified by:
accept in interface java.io.FilenameFilter

fileOrFiles

public static java.io.File[] fileOrFiles(java.io.File f)
this method checks to see if an asterisk is imbedded in the filename, if it is, it does an "ls" or "dir" of the parent directory returning a list of files that match eg. /usr/home/mjennings/*.jar would expand out to all of the files with a .jar extension in the /usr/home/mjennings directory