mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Full rewrite of camera system
This commit is contained in:
25
Main/src/main/java/com/chameleonvision/FileHelper.java
Normal file
25
Main/src/main/java/com/chameleonvision/FileHelper.java
Normal file
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user