Class Files

java.lang.Object
com.easypost.easyvcr.internal.Files

public abstract class Files extends Object
  • Constructor Details

    • Files

      public Files()
  • Method Details

    • createFileIfNotExists

      public static void createFileIfNotExists(String filePath) throws IOException
      Creates a file if it doesn't exist.
      Parameters:
      filePath - The path to the file.
      Throws:
      IOException - If the file cannot be created.
    • readFile

      public static String readFile(File file)
      Reads a file.
      Parameters:
      file - The file to read.
      Returns:
      The contents of the file.
    • readFile

      public static String readFile(String filePath)
      Reads a file.
      Parameters:
      filePath - The path to the file.
      Returns:
      The contents of the file.
    • writeFile

      public static void writeFile(String filePath, String string) throws IOException
      Writes a file.
      Parameters:
      filePath - The path to the file.
      string - The contents to write.
      Throws:
      IOException