question: public static boolean copyFile ( File source , File dest ) { File parentDest = dest . getParentFile ( ) ; if ( ! parentDest . exists ( ) ) { if ( ! createDirectory ( parentDest . getAbsolutePath ( ) ) ) { return false ; } } try { Files . copy ( source . toPath ( ) , dest . toPath ( ) ) ; return true ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } }
target:  Copy source file to destination file. Create directory if destination directory does not exist