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


< > BotCompany Repo | #1001461 // listDirs (only first level)

JavaX fragment (include)

static L<File> listDirs(File dir) {
  if (dir == null) ret emptyList();
  File[] files = dir.listFiles();
  new L<File> l;
  if (files != null)
    for (File f : files)
      if (f.isDirectory())
  return l;

static L<File> listDirs(S dir) {
  ret listDirs(newFile(dir));

Author comment

Lists dirs only

Began life as a copy of #1001459

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001461
Snippet name: listDirs (only first level)
Eternal ID of this version: #1001461/3
Text MD5: 677737ed39c050f6afe894d296ebfb84
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-14 17:55:31
Source code size: 306 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 673 / 974
Version history: 2 change(s)
Referenced in: [show references]