jodd-core/src/main/java/jodd/io/FileUtil.java
private static void checkFileCopy(final File srcFile, final File destFile) throws IOException {
		checkExists(srcFile);
		checkIsFile(srcFile);
		if (equals(srcFile, destFile)) {
			throw new IOException("Files '" + srcFile + "' and '" + destFile + "' are equal");
		}

		File destParent = destFile.getParentFile();
		if (destParent != null && !destParent.exists()) {
			checkCreateDirectory(destParent);
		}
	}
private static void checkFileCopy(final File srcFile, final File destFile) throws IOException {
		checkExists(srcFile);
		checkIsFile(srcFile);
		if (equals(srcFile, destFile)) {
			throw new IOException("Files '" + srcFile + "' and '" + destFile + "' are equal");
		}

		File destParent = destFile.getParentFile();
		if (destParent != null && !destParent.exists()) {
			checkCreateDirectory(destParent);
		}
	}
private static void checkFileCopy ( final File srcFile , final File destFile ) throws IOException { checkExists ( srcFile ) ; checkIsFile ( srcFile ) ; if ( equals ( srcFile , destFile ) ) { throw new IOException ( "Files '" + srcFile + "' and '" + destFile + "' are equal" ) ; } File destParent = destFile . getParentFile ( ) ; if ( destParent != null && ! destParent . exists ( ) ) { checkCreateDirectory ( destParent ) ; } }
Checks that file copy can occur.

@param srcFile  Source {@link File}
@param destFile Destination {@link File}
@throws IOException if srcFile does not exist or is not a file or
srcFile and destFile are equal or cannot create ancestor directories.
Checks that file copy can occur .