Beispiel #1
0
 public static void resetRepository() throws IOException {
   if (CURRENT_INTERPRETER_REPOSITORY != null) {
     CURRENT_INTERPRETER_REPOSITORY.clear();
   }
   File cache = new File(ProjectProperties.REPOSITORY + File.separator + "caches");
   System.err.println("Deleting cache " + cache.getName());
   removeFiles(cache);
 }
Beispiel #2
0
 private static void removeFiles(File file) throws IOException {
   if (file.exists() && file.isDirectory()) {
     for (File f : file.listFiles()) {
       removeFiles(f);
     }
   } else if (file.exists() && !file.isDirectory()) {
     if (!file.delete()) throw new IOException();
   }
 }