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

18
LINES

< > BotCompany Repo | #1002636 // List All Files - hopefully nothing sensitive in there

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (899L/7K/21K).

!752

answer {
  if "list all files" {
    File base = javaxDataDir();
    S basePath = base.getAbsolutePath();
    L<File> files = findAllFiles(base);
    
    new L<S> l;
    for (File f : files)
      if (!f.isDirectory()) {
        S size = rpad(formatDouble(toM_double(f.length()), 1) + " M", 8);
        l.add(size + " " + substring(f.getAbsolutePath(), l(basePath)));
      }
      
    ret slackSnippet(fromLines(l));
  }
}

Author comment

Began life as a copy of #1002584

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: #1002636
Snippet name: List All Files - hopefully nothing sensitive in there
Eternal ID of this version: #1002636/1
Text MD5: 4f114cb51a587f8efad51d50922edd7b
Transpilation MD5: d8ec45a64ece62b9c7983dbaf72c0e70
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-06 04:48:18
Source code size: 448 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 785 / 1199
Referenced in: [show references]