List of utility methods to do File Delete
boolean | deleteFile(File file) delete File if (file != null && file.exists()) { if (file.isFile()) { return file.delete(); } else { for (File f : file.listFiles()) { deleteFile(f); return file.delete(); ... |
boolean | deleteFile(File root) delete File if (root.exists()) { if (root.isDirectory()) { File[] files = root.listFiles(); for (int i = 0; i < files.length; i++) deleteFile(files[i]); return root.delete(); return false; |
boolean | deleteFile(File spec) Deletes a file or directory. return deleteDir(spec);
|
void | deleteFile(String filePath) delete File if (StringUtil.isEmpty(filePath)) { return; File file = new File(filePath); if (!file.exists()) { return; if (file.isDirectory()) { ... |
void | deleteFile(String filePath) delete File File file = new File(filePath);
deleteFile(file);
|
boolean | deleteFile(String filename) delete File File file = new File(filename); if (file.isFile()) { return file.delete(); return false; |
void | deleteFile(String path) Convenience function to delete a file. if (!new File(path).delete()) throw new IOException(String.format( "Unable to delete file '%s'", path)); |
void | deleteFile(String path) delete File File file = new File(path); if (!file.exists() || file.isFile()) return; if (file.isDirectory()) deleteSubfiles(file.getAbsolutePath()); file.delete(); |
boolean | deleteFile(String path) Deletes a file or directory. return deleteDir(new File(path)); |
void | deleteFile(String path) delete File File file = new File(path);
deleteFile(file);
|