@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()); SchemaCache.delete(new File("target/test/a")); Assert.assertFalse((new File("target/test/a")).exists()); }
static void delete(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { delete(f); } } } file.delete(); }
SchemaCache { static void delete(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { delete(f); } } } file.delete(); } }
SchemaCache { static void delete(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { delete(f); } } } file.delete(); } SchemaCache(File directory, boolean download);  SchemaCache(File directory, boolean download, boolean keepQuery); }
SchemaCache { static void delete(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { delete(f); } } } file.delete(); } SchemaCache(File directory, boolean download);  SchemaCache(File directory, boolean download, boolean keepQuery); File getDirectory(); File getTempDirectory(); boolean isDownloadAllowed(); String resolveLocation(String location); static SchemaCache buildAutomaticallyConfiguredUsingFileUrl(URL url); static void disableAutomaticConfiguration(); static void enableAutomaticConfiguration(); static boolean isAutomaticConfigurationEnabled(); }
SchemaCache { static void delete(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { delete(f); } } } file.delete(); } SchemaCache(File directory, boolean download);  SchemaCache(File directory, boolean download, boolean keepQuery); File getDirectory(); File getTempDirectory(); boolean isDownloadAllowed(); String resolveLocation(String location); static SchemaCache buildAutomaticallyConfiguredUsingFileUrl(URL url); static void disableAutomaticConfiguration(); static void enableAutomaticConfiguration(); static boolean isAutomaticConfigurationEnabled(); static final String PROVIDED_CACHE_LOCATION_KEY; }