jodd-core/src/main/java/jodd/io/FileUtil.java
public static void copy(final File src, final File dest) throws IOException {
		if (src.isDirectory()) {
			copyDir(src, dest);
			return;
		}
		if (dest.isDirectory()) {
			copyFileToDir(src, dest);
			return;
		}
		copyFile(src, dest);
	}
public static void copy(final File src, final File dest) throws IOException {
		if (src.isDirectory()) {
			copyDir(src, dest);
			return;
		}
		if (dest.isDirectory()) {
			copyFileToDir(src, dest);
			return;
		}
		copyFile(src, dest);
	}
public static void copy ( final File src , final File dest ) throws IOException { if ( src . isDirectory ( ) ) { copyDir ( src , dest ) ; return ; } if ( dest . isDirectory ( ) ) { copyFileToDir ( src , dest ) ; return ; } copyFile ( src , dest ) ; }
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.

@param src  source {@link File}
@param dest destination {@link File}
@throws IOException if there is an error copying.
@see #copyDir(File, File)
@see #copyFileToDir(File, File)
@see #copyFile(File, File)
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 .