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

21
LINES

< > BotCompany Repo | #1000426 // Android Example: Scan screenshots directory

JavaX source code (Android) [tags: use-pretranspiled] - run with: the app

Libraryless. Click here for Pure Java version (28L/1K/2K).

!636

import android.app.Activity;

main {
  psvm {
    File dir = new File("/sdcard/Pictures/Screenshots");
    System.out.println("Scanning: " + dir.getPath());
    
    File[] list = dir.listFiles();
    if (list == null)
      print "Could not list"
    else
      for (File f : list) {
        if (f.isDirectory())
          System.out.println("Directory found: " + f);
        else
          System.out.println("File found: " + f);
      }
  }
}

Author comment

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: 609 / 579
Referenced in: [show references]