MCPcopy
hub / github.com/apache/commons-io / copyFile

Method copyFile

src/main/java/org/apache/commons/io/FileUtils.java:1039–1041  ·  view source on GitHub ↗

Copies a file to a new location preserving the file date. This method copies the contents of the specified source file to the specified destination file. The directory holding the destination file is created if it does not exist. If the destination file exists, then this method will overwrite it

(final File srcFile, final File destFile)

Source from the content-addressed store, hash-verified

1037 * @see #copyFile(File, File, boolean)
1038 */
1039 public static void copyFile(final File srcFile, final File destFile) throws IOException {
1040 copyFile(srcFile, destFile, true);
1041 }
1042
1043 /**
1044 * Copies a file to a new location.

Callers 9

testCopyFile1Method · 0.95
testCopyFileLargeMethod · 0.95
testCopyFile2Method · 0.95
testCopyToSelfMethod · 0.95
copyFileToDirectoryMethod · 0.95
moveFileMethod · 0.95

Calls 7

checkFileRequirementsMethod · 0.95
doCopyFileMethod · 0.95
copyLargeMethod · 0.95
isDirectoryMethod · 0.80
existsMethod · 0.80
equalsMethod · 0.45
closeMethod · 0.45

Tested by 7

testCopyFile1Method · 0.76
testCopyFileLargeMethod · 0.76
testCopyFile2Method · 0.76
testCopyToSelfMethod · 0.76