Class FileUtils
java.lang.Object
org.photonvision.common.util.file.FileUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Copy a file from a source to a new destination.static boolean
deleteDirectory
(Path path) static boolean
deleteFile
(Path path) Delete the file at the path.static boolean
replaceFile
(Path src, Path dst) Replace the destination file with a new source.static void
setAllPerms
(Path path) static void
setFilePerms
(Path path)
-
Method Details
-
deleteDirectory
-
deleteFile
Delete the file at the path.- Parameters:
path
- file path to delete.- Returns:
- whether the operation was successful.
-
copyFile
Copy a file from a source to a new destination.- Parameters:
src
- the file path to copy.dst
- the file path to replace.- Returns:
- whether the operation was successful.
-
replaceFile
Replace the destination file with a new source.- Parameters:
src
- the file path to replace with.dst
- the file path to replace.- Returns:
- whether the operation was successful.
-
setFilePerms
- Throws:
IOException
-
setAllPerms
-