(String path)
| 182 | * Creates any directories needed to store the given filename. |
| 183 | */ |
| 184 | public static void CreatePath(String path) { |
| 185 | int index = path.lastIndexOf('/'); |
| 186 | // -1 if not found and 0 means write to root |
| 187 | if (index > 0) { |
| 188 | File f = new File(path.substring(0, index)); |
| 189 | if (!f.mkdirs() && !f.isDirectory()) { |
| 190 | Com.Printf("can't create path \"" + path + '"' + "\n"); |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | public static boolean FileExists(String filename) { |
| 196 | try { |
no test coverage detected