本文整理了Java中hudson.FilePath.renameTo()
方法的一些代码示例,展示了FilePath.renameTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilePath.renameTo()
方法的具体详情如下:
包路径:hudson.FilePath
类名称:FilePath
方法名:renameTo
[英]Rename this file/directory to the target filepath. This FilePath and the target must be on the some host
[中]将此文件/目录重命名为目标文件路径。此文件路径和目标必须位于某个主机上
代码示例来源:origin: org.jenkins-ci.modules/windows-slave-installer
agentExe.renameTo(backup);
tmp.renameTo(agentExe);
listener.getLogger().println("Scheduled overwrite of jenkins-slave.exe on the next service startup");
} catch (Throwable e) {
代码示例来源:origin: org.jvnet.hudson.plugins/clearcase
filePath.renameTo(getUnusedFilePath(workspace, viewPath));
rmviewtag(viewTag);
filePath.renameTo(getUnusedFilePath(workspace, viewPath));
代码示例来源:origin: org.jenkins-ci.plugins/docker-commons
install.child("docker/docker").renameTo(docker);
if (!docker.exists()) { // TODO FilePath.renameTo does not check its return value
throw new AbortException(tgz + " did not contain a docker/docker entry as expected");
代码示例来源:origin: jenkinsci/docker-commons-plugin
install.child("docker/docker").renameTo(docker);
if (!docker.exists()) { // TODO FilePath.renameTo does not check its return value
throw new AbortException(tgz + " did not contain a docker/docker entry as expected");
内容来源于网络,如有侵权,请联系作者删除!