org.apache.avalon.excalibur.io
Class DirectoryFileFilter
java.lang.Object
|
+--org.apache.avalon.excalibur.io.DirectoryFileFilter
- All Implemented Interfaces:
- FilenameFilter
- public class DirectoryFileFilter
- extends Object
- implements FilenameFilter
This filter accepts File
s that are directories.
Eg., here is how to print out a list of the current directory's subdirectories:
File dir = new File(".");
String[] files = dir.list( new DirectoryFileFilter() );
for ( int i=0; i<files.length; i++ )
{
System.out.println(files[i]);
}
- Since:
- 4.0
- Version:
- $Revision: 1.4 $ $Date: 2003/03/22 12:46:24 $
- Author:
- Peter Donald
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryFileFilter
public DirectoryFileFilter()
accept
public boolean accept(File file,
String name)
- Specified by:
accept
in interface FilenameFilter
Copyright © 2000-2003 Apache Jakarta Project. All Rights Reserved.