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

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
171819 20212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 22nd, 2025 07:22 pm
Powered by Dreamwidth Studios