@Override public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(deleting(f)); return null; } }
/** * Rename a legacy file to a new name, with care to Windows where {@link File#renameTo(File)} * doesn't work if the destination already exists. */ private void rename(File legacyFile, File newFile) throws IOException { if (!legacyFile.exists()) return; if (newFile.exists()) { Util.deleteFile(newFile); } if (!legacyFile.renameTo(newFile)) { LOGGER.warning("Failed to rename " + legacyFile + " to " + newFile); } }
Util.deleteFile(mapFile); System.err.println(builds + " has been restored to its original format");
LOGGER.log(WARNING, "need to delete anomalous file entry {0}", name); Util.deleteFile(kid); it.remove(); } catch (Exception x) {
Util.deleteFile(changelogFile);
public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(deleting(f)); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(f); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(f); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(f); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { Util.deleteFile(f); return null; } });
/** * Rename a legacy file to a new name, with care to Windows where {@link File#renameTo(File)} * doesn't work if the destination already exists. */ private void rename(File legacyFile, File newFile) throws IOException { if (!legacyFile.exists()) return; if (newFile.exists()) { Util.deleteFile(newFile); } if (!legacyFile.renameTo(newFile)) { LOGGER.warning("Failed to rename " + legacyFile + " to " + newFile); } }
public void commit() throws IOException { close(); if (destFile.exists()) { try { Util.deleteFile(destFile); } catch (IOException x) { tmpFile.delete(); throw x; } } tmpFile.renameTo(destFile); }
public static void deleteRecursive(File dir) throws IOException { if(!isSymlink(dir)) deleteContentsRecursive(dir); deleteFile(dir); }
public static void deleteRecursive(File dir) throws IOException { if (!isSymlink(dir)) { deleteContentsRecursive(dir); } deleteFile(dir); }
public static void deleteRecursive(File dir) throws IOException { if(!isSymlink(dir)) deleteContentsRecursive(dir); deleteFile(dir); }
public static void deleteRecursive(File dir) throws IOException { if (!isSymlink(dir)) { deleteContentsRecursive(dir); } deleteFile(dir); }
Util.deleteFile(mapFile); System.err.println(builds + " has been restored to its original format");
private void deleteRecursive(File dir) throws IOException { if(!isSymlink(dir)) deleteContentsRecursive(dir); try { deleteFile(deleting(dir)); } catch (IOException e) { // if some of the child directories are big, it might take long enough to delete that // it allows others to create new files, causing problems like JENKINS-10113 // so give it one more attempt before we give up. if(!isSymlink(dir)) deleteContentsRecursive(dir); deleteFile(deleting(dir)); } }
Util.deleteFile(changelogFile);
public void deleteTeam(String teamName, boolean deleteJobs) throws TeamNotFoundException, IOException { Team team = findTeam(teamName); if (Team.PUBLIC_TEAM_NAME.equals(team.getName())) { throw new IOException("Cannot delete public team"); } for (TeamJob job : team.getJobs()) { TopLevelItem item = Hudson.getInstance().getItem(job.getId()); if (item != null && (item instanceof Job)) { if (deleteJobs) { try { item.delete(); } catch (InterruptedException e) { throw new IOException("Delete team " + team.getName() + " was interrupted"); } } else { // Make deleted team jobs public moveJob((Job) item, team, publicTeam, null); } } } teams.remove(team); save(); File teamFolder = team.getTeamFolder(teamsFolder); if (teamFolder.exists() && teamFolder.isDirectory()) { Util.deleteContentsRecursive(teamFolder); Util.deleteFile(teamFolder); } }