(File tpFile, String basePath, String[] prefixes, String[] suffixes)
| 116 | } |
| 117 | |
| 118 | private static String[] collectFilesFolder(File tpFile, String basePath, String[] prefixes, String[] suffixes) |
| 119 | { |
| 120 | List list = new ArrayList(); |
| 121 | String s = "assets/minecraft/"; |
| 122 | File[] afile = tpFile.listFiles(); |
| 123 | |
| 124 | if (afile == null) |
| 125 | { |
| 126 | return new String[0]; |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | for (int i = 0; i < afile.length; ++i) |
| 131 | { |
| 132 | File file1 = afile[i]; |
| 133 | |
| 134 | if (file1.isFile()) |
| 135 | { |
| 136 | String s3 = basePath + file1.getName(); |
| 137 | |
| 138 | if (s3.startsWith(s)) |
| 139 | { |
| 140 | s3 = s3.substring(s.length()); |
| 141 | |
| 142 | if (StrUtils.startsWith(s3, prefixes) && StrUtils.endsWith(s3, suffixes)) |
| 143 | { |
| 144 | list.add(s3); |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | else if (file1.isDirectory()) |
| 149 | { |
| 150 | String s1 = basePath + file1.getName() + "/"; |
| 151 | String[] astring = collectFilesFolder(file1, s1, prefixes, suffixes); |
| 152 | |
| 153 | for (int j = 0; j < astring.length; ++j) |
| 154 | { |
| 155 | String s2 = astring[j]; |
| 156 | list.add(s2); |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | String[] astring1 = (String[])((String[])list.toArray(new String[list.size()])); |
| 162 | return astring1; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | private static String[] collectFilesZIP(File tpFile, String[] prefixes, String[] suffixes) |
| 167 | { |
no test coverage detected