1 | import java.io.File; |
2 | |
3 | /** list2 |
4 | * lists all files+dir in top-level of input directory |
5 | * Has better output than "list" */ |
6 | public class main { |
7 | public static void main(String[] args) { |
8 | File[] files = new File("input").listFiles(); |
9 | if (files == null) files = new File[0]; |
10 | System.out.println("Meta: FileCount=" + files.length); |
11 | for (File f : files) { |
12 | System.out.println("File: " + f.getName()); |
13 | } |
14 | } |
15 | } |
Began life as a copy of #573
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #574 |
Snippet name: | list2 (JavaX) |
Eternal ID of this version: | #574/1 |
Text MD5: | 4f84d96c444e5a7a4068f2b9384b73f7 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-04-12 22:42:45 |
Source code size: | 443 bytes / 15 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 678 / 714 |
Referenced in: | [show references] |