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: 815 / 1239
Referenced in: #3000203 - Answer for stefanreich (>> timing hello bot)
#3000208 - Answer for bgrgndz (>> list sub bots)
#3000209 - Answer for bgrgndz (>> list sub bots)
#3000369 - Answer for Stefan (>> list sub bots)
#3000376 - Answer for stefanreich (>> list sub bots)
#3000377 - Answer for stefanreich (>> timing eleu?)
#3000380 - Answer for stefanreich (>> list sub bots)
#3000381 - Answer for speedforce (>> list sub bots)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)