(String zipPath)
| 98 | } |
| 99 | |
| 100 | public void getFileList(String zipPath) { |
| 101 | // The problem here is that assets needs to be a URI path in Java. |
| 102 | Map<String, ZipEntry> map = Assets.getZipContents(zipPath); |
| 103 | if (map == null) { |
| 104 | System.err.println("Map is null: " + zipPath); |
| 105 | return; |
| 106 | } |
| 107 | List<String> list = new ArrayList<>(); |
| 108 | list.add(""); |
| 109 | for (Map.Entry<String, ZipEntry> entry : map.entrySet()) { |
| 110 | ZipEntry val = entry.getValue(); |
| 111 | list.add(rightFill(val.getName(), 70) + leftFill(""+ val.getSize(), 8) + " bytes"); |
| 112 | } |
| 113 | String[] s = list.toArray(new String[list.size()]); |
| 114 | Arrays.sort(s); |
| 115 | OSPLog.debug(Arrays.toString(s).replace(",", "\n").replaceAll("[\\[\\]]", "")); |
| 116 | |
| 117 | |
| 118 | } |
| 119 | |
| 120 | private String leftFill(String name, int n) { |
| 121 | name = " " + name; |
no test coverage detected