Feb. 8th, 2005

juan_gandhi: (Default)
I think I got it. Use double loop. No recursion necessary (it is hidden in tree() method).


import static com.myjavatools.lib.Files.*;

..........

    for (File dir : tree(new File("."))) {
      System.out.println(dir);
      for (File f : files(dir)) {
        System.out.println("  " + f);
      }
    }





Check out myjavatools.com - lib, version 5.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

October 2025

S M T W T F S
    1 23 4
5 678 9 1011
12 13 1415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 16th, 2025 11:10 am
Powered by Dreamwidth Studios