(File from, File to)
| 103 | } |
| 104 | |
| 105 | public static void copy(File from, File to) throws IOException { |
| 106 | if (!from.exists()) { |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | if (from.isDirectory()) { |
| 111 | copyDir(from, to); |
| 112 | } else { |
| 113 | copyFile(from, to); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | private static void copyDir(File from, File to) throws IOException { |
| 118 | // Create the target directory. |