View Single Post
  #4 (permalink)  
Old 12-12-2007, 09:18 PM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Code:
File[] list = folder.listFiles(new FileFilter() { @Override public boolean accept(File file) { if (file.isDirectory()) return true; return false; } });
As you can see in those few lines i AM creating a FileFilter, in this portion specifically:
Code:
@Override public boolean accept(File file) {
Is where i override accept(File file).

And yeah, thats the right way to use it, calling iterate will loop trough all the folders, printing them to command line.
Reply With Quote