Eg., to print all files beginning with A
and ending with .java
:
File dir = new File("."); String[] files = dir.list( new AndFileFilter( new PrefixFileFilter("A"), new ExtensionFileFilter(".java") ) ); for ( int i=0; i<files.length; i++ ) { System.out.println(files[i]); }@author Avalon Development Team @version $Revision: 494012 $ $Date: 2007-01-08 10:23:58 +0000 (Mon, 08 Jan 2007) $ @since 4.0
|
|
|
|
|
|
|
|
|
|
|
|