(String filename, String fullborderFile)
| 340 | return false; |
| 341 | } |
| 342 | public static File setLookUpFile(String filename, String fullborderFile) { |
| 343 | if (!StaticData.instance().getSetLookup().isEmpty()) { |
| 344 | for (String setKey : StaticData.instance().getSetLookup().keySet()) { |
| 345 | if (filename.startsWith(setKey)) { |
| 346 | for (String setLookup : StaticData.instance().getSetLookup().get(setKey)) { |
| 347 | String lookupDirectory = CACHE_CARD_PICS_DIR + setLookup; |
| 348 | File f = new File(lookupDirectory); |
| 349 | if (f.exists() && f.isDirectory()) { |
| 350 | for (String ext : FILE_EXTENSIONS) { |
| 351 | if (ext.isEmpty()) |
| 352 | continue; |
| 353 | File placeholder; |
| 354 | String fb1 = fullborderFile.replace(setKey+"/","")+ext; |
| 355 | placeholder = new File(lookupDirectory+"/"+fb1); |
| 356 | if (placeholder.exists()) { |
| 357 | return placeholder; |
| 358 | } |
| 359 | String fb2 = fullborderFile.replace(setKey+"/","").replaceAll("[0-9]*.fullborder", "1.fullborder")+ext; |
| 360 | placeholder = new File(lookupDirectory+"/"+fb2); |
| 361 | if (placeholder.exists()) { |
| 362 | return placeholder; |
| 363 | } |
| 364 | String f1 = filename.replace(setKey+"/","")+ext; |
| 365 | placeholder = new File(lookupDirectory+"/"+f1); |
| 366 | if (placeholder.exists()) { |
| 367 | return placeholder; |
| 368 | } |
| 369 | String f2 = filename.replace(setKey+"/","").replaceAll("[0-9]*.full", "1.full")+ext; |
| 370 | placeholder = new File(lookupDirectory+"/"+f2); |
| 371 | if (placeholder.exists()) { |
| 372 | return placeholder; |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | return null; |
| 381 | } |
| 382 | private static File findFile(String dir, String filename) { |
| 383 | if (dir.equals(CACHE_CARD_PICS_DIR)) { |
| 384 | for (String ext : FILE_EXTENSIONS) { |
no test coverage detected