@Test public void delete() throws Exception { (new File("target/test/a/b/c")).mkdirs(); (new File("target/test/a/b/d/e/f")).mkdirs(); File f = new File("target/test/a/b/d/e/f/temp.txt"); PrintWriter printWriter = null; try { printWriter = new PrintWriter(f); printWriter.println("Some text"); } finally { if (printWriter != null) { printWriter.close(); } } Assert.assertTrue((new File("target/test/a/b/d/e/f/temp.txt")).exists()); AppSchemaCache.delete(new File("target/test/a")); Assert.assertFalse((new File("target/test/a")).exists()); }
static void delete(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { delete(f); } } file.delete(); }
AppSchemaCache { static void delete(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { delete(f); } } file.delete(); } }
AppSchemaCache { static void delete(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { delete(f); } } file.delete(); } AppSchemaCache(File directory, boolean download); }
AppSchemaCache { static void delete(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { delete(f); } } file.delete(); } AppSchemaCache(File directory, boolean download); File getDirectory(); boolean isDownloadAllowed(); String resolveLocation(String location); static AppSchemaCache buildFromGeoserverUrl(URL url); static void disableGeoserverSupport(); static void enableGeoserverSupport(); static boolean isGeoserverSupportEnabled(); }
AppSchemaCache { static void delete(File file) { if (file.isDirectory()) { for (File f : file.listFiles()) { delete(f); } } file.delete(); } AppSchemaCache(File directory, boolean download); File getDirectory(); boolean isDownloadAllowed(); String resolveLocation(String location); static AppSchemaCache buildFromGeoserverUrl(URL url); static void disableGeoserverSupport(); static void enableGeoserverSupport(); static boolean isGeoserverSupportEnabled();  }