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

21
LINES

< > BotCompany Repo | #1013812 // List all jars in a directory by file [OK]

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

Libraryless. Click here for Pure Java version (8440L/59K/211K).

!7

p {
  print("Please enter directory.");
  bot();
}

answer {
  new MultiMap<S> data;
  
  for (File jar : listFilesWithExtension(new File(trim(s)), "jar")) {
    S jarName = jar.getName();
    for (S name : listZip(jar))
      data.put(name, jarName);
  }
  
  showTableWithSearcher(
    mapToListOfOrderedMap(multiMapJoinValuesWithComma_treeMap(data),
      "File", "Jar"));
  try answer "OK";
}

Author comment

Began life as a copy of #1004429

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: #1013812
Snippet name: List all jars in a directory by file [OK]
Eternal ID of this version: #1013812/6
Text MD5: a6e72a6a31c77337d5664e858415fe1e
Transpilation MD5: 33cc20be9e0e7850a05b374404ae1414
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-03-02 17:04:14
Source code size: 420 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 355 / 405
Version history: 5 change(s)
Referenced in: [show references]