question: public static void copy ( File src , File dst ) throws IOException { if ( src . isDirectory ( ) ) { ensureDirectoryExists ( dst ) ; String [ ] filesList = src . list ( ) ; for ( String file : filesList ) { File srcFile = new File ( src , file ) ; File destFile = new File ( dst , file ) ; copy ( srcFile , destFile ) ; } } else { copyFile ( src , dst ) ; } }
target:  Copy file object from one place to another. Can be used to copy file to file, or folder to folder.