org.apache.java.io
Class SimpleFileFilter

java.lang.Object
  |
  +--org.apache.java.io.SimpleFileFilter

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

Class that implements the java.io.FilenameFilter interface.

Version:
$Revision: 1.3 $

Field Summary
private  java.lang.String[] extensions
           
 
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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

extensions

private java.lang.String[] extensions
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