| 65 | } |
| 66 | |
| 67 | public static void copy(File sourceFolder, File destFolder) throws IOException { |
| 68 | for (File file : sourceFolder.listFiles()) { |
| 69 | File destFile = new File(destFolder, file.getName()); |
| 70 | if (file.isDirectory() && !SOURCE_CONTROL_FOLDERS.contains(file.getName())) { |
| 71 | if (!destFile.exists() && !destFile.mkdir()) { |
| 72 | throw new IOException("Unable to create folder: " + destFile); |
| 73 | } |
| 74 | copy(file, destFile); |
| 75 | } else if (!file.isDirectory()) { |
| 76 | copyFile(file, destFile); |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | public static void recursiveDelete(File file) { |
| 82 | if (file == null) { |