org.springframework.roo.support.util.FileUtils.copyRecursively()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中org.springframework.roo.support.util.FileUtils.copyRecursively()方法的一些代码示例,展示了FileUtils.copyRecursively()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.copyRecursively()方法的具体详情如下:
包路径:org.springframework.roo.support.util.FileUtils
类名称:FileUtils
方法名:copyRecursively

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 + "'");

相关文章