Ejemplo n.º 1
0
 public static File getCacheFile(String fileName) {
   final String file = LSystem.getCacheFileName();
   fileName = StringUtils.replaceIgnoreCase(fileName, "\\", "/");
   if (file != null) {
     if (fileName.startsWith("/") || fileName.startsWith("\\")) {
       fileName = fileName.substring(1, fileName.length());
     }
     if (file.endsWith("/") || file.endsWith("\\")) {
       return new File(LSystem.getCacheFileName() + fileName);
     } else {
       return new File(LSystem.getCacheFileName() + LSystem.FS + fileName);
     }
   } else {
     return new File(fileName);
   }
 }