private void handle(String msg) { handle(new BuildException(msg)); }
/** * Delete a directory * * @param d the directory to delete */ protected void removeDir(File d) { String[] list = d.list(); if (list == null) { list = new String[0]; } for (String s : list) { File f = new File(d, s); if (f.isDirectory()) { removeDir(f); } else { log("Deleting " + f.getAbsolutePath(), quiet ? Project.MSG_VERBOSE : verbosity); if (!delete(f)) { handle("Unable to delete file " + f.getAbsolutePath()); } } } log("Deleting directory " + d.getAbsolutePath(), verbosity); if (!delete(d)) { handle("Unable to delete directory " + d.getAbsolutePath()); } }
handle("Unable to delete file " + file.getAbsolutePath()); quiet ? Project.MSG_VERBOSE : verbosity); if (!delete(file)) { handle("Unable to delete file " + file.getAbsolutePath()); quiet ? Project.MSG_VERBOSE : verbosity); if (!delete(dir)) { handle("Unable to delete directory " + dir.getAbsolutePath()); throw new BuildException("File or Resource without directory or file specified"); } else if (!fsDir.isDirectory()) { handle("Directory does not exist: " + fsDir); } else { DirectoryScanner ds = fs.getDirectoryScanner(); handle("Could not delete symbolic link at " + filePath); log("Deleting " + f, verbosity); if (!delete(f) && failonerror) { handle("Unable to delete " + (f.isDirectory() ? "directory " : "file ") + f); handle(getTaskName() + " handles only filesystem resources"); handle(e); } finally { if (implicit != null) {