@Test public void testDelete() throws Exception { for (int i = 0; i < 10; i++) { IOTinyUtils.writeStringToFile(new File(testRootDir, "testDelete" + i), "testCleanDirectory", RemotingHelper.DEFAULT_CHARSET); } File dir = new File(testRootDir); assertTrue(dir.exists() && dir.isDirectory()); assertTrue(dir.listFiles().length > 0); IOTinyUtils.delete(new File(testRootDir)); assertTrue(!dir.exists()); }
public static void delete(File fileOrDir) throws IOException { if (fileOrDir == null) { return; } if (fileOrDir.isDirectory()) { cleanDirectory(fileOrDir); } fileOrDir.delete(); }
IOTinyUtils { public static void delete(File fileOrDir) throws IOException { if (fileOrDir == null) { return; } if (fileOrDir.isDirectory()) { cleanDirectory(fileOrDir); } fileOrDir.delete(); } }
IOTinyUtils { public static void delete(File fileOrDir) throws IOException { if (fileOrDir == null) { return; } if (fileOrDir.isDirectory()) { cleanDirectory(fileOrDir); } fileOrDir.delete(); }  }
IOTinyUtils { public static void delete(File fileOrDir) throws IOException { if (fileOrDir == null) { return; } if (fileOrDir.isDirectory()) { cleanDirectory(fileOrDir); } fileOrDir.delete(); }  static String toString(InputStream input, String encoding); static String toString(Reader reader); static long copy(Reader input, Writer output); static List<String> readLines(Reader input); static void copyFile(String source, String target); static void delete(File fileOrDir); static void cleanDirectory(File directory); static void writeStringToFile(File file, String data, String encoding); }
IOTinyUtils { public static void delete(File fileOrDir) throws IOException { if (fileOrDir == null) { return; } if (fileOrDir.isDirectory()) { cleanDirectory(fileOrDir); } fileOrDir.delete(); }  static String toString(InputStream input, String encoding); static String toString(Reader reader); static long copy(Reader input, Writer output); static List<String> readLines(Reader input); static void copyFile(String source, String target); static void delete(File fileOrDir); static void cleanDirectory(File directory); static void writeStringToFile(File file, String data, String encoding);  }