Libraryless. Click here for Pure Java version (28L/1K/2K).
1 | !636 |
2 | |
3 | import android.app.Activity; |
4 | |
5 | main { |
6 | psvm { |
7 | File dir = new File("/sdcard/Pictures/Screenshots"); |
8 | System.out.println("Scanning: " + dir.getPath()); |
9 | |
10 | File[] list = dir.listFiles(); |
11 | if (list == null) |
12 | print "Could not list" |
13 | else |
14 | for (File f : list) { |
15 | if (f.isDirectory()) |
16 | System.out.println("Directory found: " + f); |
17 | else |
18 | System.out.println("File found: " + f); |
19 | } |
20 | } |
21 | } |
Began life as a copy of #710
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, exkalrxbqyxc, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000426 |
Snippet name: | Android Example: Scan screenshots directory |
Eternal ID of this version: | #1000426/1 |
Text MD5: | 8b5acaabe7845d679ddeb93bdfe23938 |
Transpilation MD5: | 66832dfe24dd13b96e16adf3d5fa7a7a |
Author: | stefan |
Category: | javax android |
Type: | JavaX source code (Android) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-08-05 18:39:43 |
Source code size: | 471 bytes / 21 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 676 / 681 |
Referenced in: | [show references] |