Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1019350 // findAllDirs (recurses)

JavaX fragment (include)

static L<File> findAllDirs(File dir) {
  new L<File> out;
  findAllDirs(dir, out);
  ret out;
}

svoid findAllDirs(File dir, L<File> out) {
  out.add(dir);
  pcall-short {
    for (File f : listFiles(dir))
      if (f.isDirectory())
        findAllDirs(f, out);
  }
}

Author comment

Began life as a copy of #1019094

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019350
Snippet name: findAllDirs (recurses)
Eternal ID of this version: #1019350/5
Text MD5: 3632f41df48941e400fad64efc7f689e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-03 13:09:12
Source code size: 280 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 344 / 380
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)