mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
26 lines
616 B
Java
26 lines
616 B
Java
package com.chameleonvision;
|
|
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
}
|