Class FileUtils

java.lang.Object
org.photonvision.common.util.file.FileUtils

public class FileUtils extends Object
  • Method Details

    • deleteDirectory

      public static boolean deleteDirectory(Path path)
    • deleteFile

      public static boolean deleteFile(Path path)
      Delete the file at the path.
      Parameters:
      path - file path to delete.
      Returns:
      whether the operation was successful.
    • copyFile

      public static boolean copyFile(Path src, Path dst)
      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

      public static boolean replaceFile(Path src, Path dst)
      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

      public static void setFilePerms(Path path) throws IOException
      Throws:
      IOException
    • setAllPerms

      public static void setAllPerms(Path path)