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())
l.add(f);
return l;
}
static L<File> listDirs(S dir) {
ret listDirs(newFile(dir));
}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: | 1305 / 1590 |
| Version history: | 2 change(s) |
| Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1020332 - listDirsStartingWith #1021035 - subDirectoryNames (only first level) #3000382 - Answer for ferdie (>> t = 1, f = 0) |