!636 main { static List<String> names; static List<Boolean> isDirectory; psvm { String dirToList = System.getProperty("user.home"); names = new ArrayList<String>(); isDirectory = new ArrayList<Boolean>(); File d = new File(dirToList); if (d.isDirectory()) { for (File f : d.listFiles()) { boolean isDir = f.isDirectory(); names.add(f.getName()); isDirectory.add(isDir); System.out.println((isDir ? "D" : "F") + " " + f.getName()); } } System.out.println("Count: " + names.size()); } }
Began life as a copy of #638
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, qbtsjoyahagl, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #650 |
| Snippet name: | Store home directory listing (developing, needs persistence) |
| Eternal ID of this version: | #650/1 |
| Text MD5: | 777d0ce0e711c24d1d25b3bc59c64271 |
| Author: | stefan |
| Category: | |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-06-27 15:19:45 |
| Source code size: | 589 bytes / 22 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 939 / 857 |
| Referenced in: | [show references] |