List of utility methods to do File Path Delete
void | deleteContents(File dirPath, List Recursive delete files. String[] ls = dirPath.list(); for (int idx = 0; idx < ls.length; idx++) { File file = new File(dirPath, ls[idx]); if (file.isDirectory()) { deleteContents(file, failures); if (!file.delete()) { failures.add(file); ... |
boolean | deleteContentsOnly(final String srcPath) delete Contents Only boolean folderDelete = true; final File srcPathFile = new File(srcPath); if (null == srcPathFile || !srcPathFile.exists()) { folderDelete = false; } else { final String files[] = srcPathFile.list(); if (files != null) { for (int index = 0; index < files.length; index++) { ... |
void | deleteDataFiles(final Collection Delete all files from collection of paths in String format. for (String path : paths) { File file = new File(path); if (file.exists()) { file.delete(); } else { throw new IOException("Failed to delete folowing data file :\n" + file.getPath()); |
void | deleteDb(String path) delete Db File dbdir = new File(path); if (dbdir.exists()) { if (dbdir.isDirectory()) { String[] files = dbdir.list(); int dirs = 0; for (int i = 0; i < files.length; i++) { File f = new File(path + "/" + files[i]); if (f.isFile()) { ... |
boolean | deleteDir(File delDir) Util: Deletes recursively the given directory. if (!delDir.exists()) return true; File[] allDelFiles = delDir.listFiles(); if (allDelFiles != null) for (int iF = 0; iF < allDelFiles.length; iF++) { if (allDelFiles[iF].isDirectory()) deleteDir(allDelFiles[iF]); else ... |
void | deleteDir(File dir) delete Dir if (!dir.exists()) { return; for (File e : dir.listFiles()) { if (e.isDirectory()) deleteDir(e); else delete(e); ... |
boolean | deleteDir(File dir) Loescht das angegebene Verzeichnis inkl. if (dir.isDirectory()) { for (File f : dir.listFiles()) { if (!deleteDir(f)) return false; return dir.delete(); |
void | deleteDir(File dir) utility method to delete a directory if (dir == null) return; if (dir.isDirectory()) { File[] files = dir.listFiles(); for (File file : files) { deleteDir(file); dir.delete(); ... |
boolean | deleteDir(File dir) Delete recursively. if (!dir.exists()) return true; File[] subfiles = dir.listFiles(); if (subfiles.length > 0) { for (File f : subfiles) { if (f.isFile()) f.delete(); else ... |
void | deleteDir(File dir) Remove the content of the specified directory and remove it File[] children = dir.listFiles(); if (children == null || children.length == 0) { dir.delete(); } else { for (File child : children) if (child.isDirectory()) deleteDir(child); else ... |