Begin network rewrite

This commit is contained in:
Banks Troutman
2019-10-04 15:55:45 -04:00
parent 2d32fa21ce
commit 7699766091
20 changed files with 338 additions and 83 deletions

View File

@@ -0,0 +1,25 @@
package com.chameleonvision.util;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class FileHelper {
private FileHelper() {} // no construction, utility class
public static void CheckPath(String path) {
if (path.equals("")) return;
Path realPath = Path.of(path);
CheckPath(realPath);
}
public static void CheckPath(Path path) {
if (!Files.exists(path)) {
try {
Files.createDirectories(path);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}