/** * Copy the files in the specified directory to another directory * @param dir Source directory * @param destination Destination Directory */ public static void copyFilesInDir(File dir, File destination) throws IOException { for (File file : listFileInDir(dir)) { File destFile = new File(destination, file.getName()); if( file.isDirectory() ) { mkdir(destFile); copyFilesInDir(file,destFile); } else { copy(file,destFile); } } }
/** * Copy the files in the specified directory to another directory * @param dir Source directory * @param destination Destination Directory */ public static void copyFilesInDir(File dir, File destination) throws IOException { for (File file : listFileInDir(dir)) { File destFile = new File(destination, file.getName()); if( file.isDirectory() ) { mkdir(destFile); copyFilesInDir(file,destFile); } else { copy(file,destFile); } } }