List of utility methods to do Delete File
void | deleteFile(File source) delete File if (source.exists()) {
source.delete();
|
boolean | deleteFile(final File f, final int attempts, final long sleepTime) delete File int retries = attempts; while (retries > 0) { if (f.delete()) { break; retries--; try { Thread.sleep(sleepTime); ... |
boolean | deleteFile(final File file) delete file or directory if (file.isDirectory()) { final File[] children = file.listFiles(); for (File child : children) { if (!deleteFile(child)) { return false; return file.delete(); |
void | deleteFile(final File file) Opens a thread to delete the specified file. new Thread(new Runnable() { @Override public void run() { while (file.exists()) { file.delete(); try { Thread.sleep(100); } catch (InterruptedException e) { ... |
boolean | deleteFile(final File file) Deletes the specified file. try { return file.delete(); } catch (final Exception ex) { ex.printStackTrace(); return false; |
boolean | deleteFile(final File file) deletes recursevelly a directory if (file == null) { throw new NullPointerException("file"); boolean status = true; if (file.isDirectory()) { for (File child : file.listFiles()) { status = status && deleteFile(child); return status && file.delete(); |
boolean | deleteFile(final String dirname) delete File final File f = new File(dirname); if (f.exists()) { return deleteR(f); return false; |
boolean | deleteFile(Object fileObj) Deletes a file from the file system. if (fileObj instanceof File) { return deleteFile((File) fileObj); return false; |
void | deleteFile(String archiveFilename) delete File try { new File(archiveFilename).delete(); } catch (Exception ex) { throw new RuntimeException("Cannot remove file: " + archiveFilename, ex); |
void | deleteFile(String dest) delete File deleteFile(new File(dest));
|