List of utility methods to do File Path Delete
void | delFile(String filePath) del File File picFile = new File(filePath); if (picFile.exists()) { picFile.delete(); picFile = null; |
void | delFile(String filePath, String fileName) del File try { File file = new File(filePath + fileName); file.delete(); } catch (Exception e) { System.err.println("delete File error"); e.printStackTrace(); |
boolean | delFile(String filePathAndName) delete file try { File file = new File(filePathAndName); return file.delete(); } catch (Exception e) { System.out.println("delete file failed"); e.printStackTrace(); return false; |
void | delFile(String filePathAndName) del File try { String filePath = filePathAndName; filePath = filePath.toString(); java.io.File myDelFile = new java.io.File(filePath); myDelFile.delete(); } catch (Exception e) { e.printStackTrace(); |
void | delFile(String filePathAndName) del File java.io.File myDelFile = new java.io.File(filePathAndName); if (myDelFile.exists()) { myDelFile.delete(); |
void | delFile(String filePathAndName) del File try { String filePath = filePathAndName; filePath = filePath.toString(); java.io.File myDelFile = new java.io.File(filePath); myDelFile.delete(); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); ... |
void | DelFile(String in_Path, ArrayList arrFileList) Del File for (int i = 0; i < arrFileList.size(); i++) { String sFile = (String) arrFileList.get(i); File delFile = new File(sFile); delFile.delete(); |
void | delFile(String path) del File File file = new File(path); if (file.exists() && file.isFile()) { file.delete(); } else if (file.exists() && file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File f : files) { if (f != null) { ... |
boolean | delFile(String pathName) del File File path = new File(pathName); return delFile(path); |
void | delFileIfExists(String path) del File If Exists File f = new File(path); if (f.exists()) { delFile(f); |