List of utility methods to do Delete File
void | deleteFile(String fileName) delete File File f = new File(fileName); if (!f.exists()) throw new IllegalArgumentException("Delete: no such file or directory: " + fileName); if (!f.canWrite()) throw new IllegalArgumentException("Delete: write protected: " + fileName); if (f.isDirectory()) { String[] files = f.list(); if (files.length > 0) ... |
void | deleteFile(String fileName) delete File File f = new File(fileName); if (f.exists()) f.delete(); |
boolean | deleteFile(String filename) Delete a file System.out.println("Deleting " + filename); try { File outtree = new File(filename); if (outtree.exists()) outtree.delete(); } catch (Exception e) { return false; return true; |
boolean | deleteFile(String fileName) This deletes the specified file. File file = new File(fileName); return file.delete(); |
void | deleteFile(String filename) delete File if (filename == null) { return; filename = getJavaFileSystemPath(filename); java.io.File file = new java.io.File(filename); if (file.exists() && file.isFile()) { boolean isOK = file.delete(); if (!isOK) { ... |
void | deleteFile(String name) delete File String diskPath = System.getProperty("java.io.tmpdir"); final File diskDir = new File(diskPath); File dataFile = new File(diskDir, name + ".data"); if (dataFile.exists()) { dataFile.delete(); File indexFile = new File(diskDir, name + ".index"); if (indexFile.exists()) { ... |
void | deleteFile(String name) delete File deleteFile(new File(name));
|