本文整理了Java中org.springframework.roo.support.util.FileUtils.copyRecursively()
方法的一些代码示例,展示了FileUtils.copyRecursively()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.copyRecursively()
方法的具体详情如下:
包路径:org.springframework.roo.support.util.FileUtils
类名称:FileUtils
方法名:copyRecursively
[英]Copies the specified source directory to the destination.
Both the source must exist. If the destination does not already exist, it will be created. If the destination does exist, it must be a directory (not a file).
[中]将指定的源目录复制到目标目录。
两个源都必须存在。如果目标不存在,将创建它。如果目标确实存在,则它必须是目录(而不是文件)。
代码示例来源:origin: spring-projects/spring-roo
public boolean undo() {
final boolean success = FileUtils.copyRecursively(backup, actual, false);
LOGGER.fine((success ? "Undo delete " : "Undo failed ")
+ filenameResolver.getMeaningfulName(actual));
return success;
}
}
代码示例来源:origin: spring-projects/spring-roo
if (!copyRecursively(s, d, deleteDestinationOnExit)) {
return false;
代码示例来源:origin: spring-projects/spring-roo
backup = new File(TEMP_DIRECTORY, "tmp_" + new Date().getTime() + "_dir");
this.filenameResolver = filenameResolver;
if (!FileUtils.copyRecursively(directory, backup, true)) {
throw new IllegalStateException("Unable to create a complete backup of directory '"
+ directory + "'");
代码示例来源:origin: org.springframework.roo/org.springframework.roo.file.undo
public boolean undo() {
final boolean success = FileUtils.copyRecursively(backup, actual, false);
LOGGER.fine((success ? "Undo delete " : "Undo failed ")
+ filenameResolver.getMeaningfulName(actual));
return success;
}
}
代码示例来源:origin: org.springframework.roo/org.springframework.roo.file.undo
backup = new File(TEMP_DIRECTORY, "tmp_" + new Date().getTime() + "_dir");
this.filenameResolver = filenameResolver;
if (!FileUtils.copyRecursively(directory, backup, true)) {
throw new IllegalStateException("Unable to create a complete backup of directory '"
+ directory + "'");
内容来源于网络,如有侵权,请联系作者删除!