java.lang.Object
io.github.amsonix.molt.internal.reschiper.utils.FileUtils

public class FileUtils extends Object
  • 构造器详细资料

    • FileUtils

      public FileUtils()
  • 方法详细资料

    • loadFileWithUnixLineSeparators

      @NotNull public static @NotNull String loadFileWithUnixLineSeparators(@NotNull @NotNull File file) throws IOException
      Loads a text file, forcing the line separator to be Unix-style '\n'.
      参数:
      file - the file to read from
      返回:
      the content of the file with Unix-style line separators
      抛出:
      IOException - if an I/O error occurs or the file does not exist
    • writeToFile

      public static void writeToFile(@NotNull @NotNull File file, @NotNull @NotNull String content) throws IOException
      Creates a new text file or replaces the content of an existing file.
      参数:
      file - the file to write to
      content - the new content of the file
      抛出:
      IOException - if an I/O error occurs