jodd.io.FileUtil.copy()方法的使用及代码示例

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

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

FileUtil.copy介绍

[英]Smart copy. If source is a directory, copy it to destination. Otherwise, if destination is directory, copy source file to it. Otherwise, try to copy source file to destination file.
[中]智能复制。如果源是目录,则将其复制到目标。否则,若目标是目录,则将源文件复制到该目录。否则,请尝试将源文件复制到目标文件。

代码示例

代码示例来源:origin: redisson/redisson

public static void copy(File src, File dest) throws IOException {
  copy(src, dest, fileUtilParams);
}
/**

代码示例来源:origin: oblac/jodd

File webXmlFile = FileUtil.toFile(webXmlUrl);
FileUtil.copy(webXmlFile, webInfFolder);

代码示例来源:origin: redisson/redisson

public static void copy(String src, String dest) throws IOException {
  copy(file(src), file(dest), fileUtilParams);
}

代码示例来源:origin: redisson/redisson

public static void copy(String src, String dest, FileUtilParams params) throws IOException {
  copy(file(src), file(dest), params);
}

代码示例来源:origin: oblac/jodd

/**
 * @see #copy(File, File)
 */
public static void copy(final String src, final String dest) throws IOException {
  copy(file(src), file(dest));
}

代码示例来源:origin: oblac/jodd

@Test
void testFileManipulation() throws IOException {
  FileUtil.copy(new File(dataRoot, "sb.data"), new File(dataRoot, "sb1.data"));
  assertFalse(FileUtil.isNewer(new File(dataRoot, "sb.data"), new File(dataRoot, "sb1.data")));
  assertFalse(FileUtil.isOlder(new File(dataRoot, "sb.data"), new File(dataRoot, "sb1.data")));
  FileUtil.delete(new File(dataRoot, "sb1.data"));
}

代码示例来源:origin: org.jodd/jodd-core

/**
 * @see #copy(File, File)
 */
public static void copy(final String src, final String dest) throws IOException {
  copy(file(src), file(dest));
}

相关文章