类 FileUtils
java.lang.Object
io.github.amsonix.molt.internal.reschiper.utils.FileUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @NotNull StringloadFileWithUnixLineSeparators(@NotNull File file) Loads a text file, forcing the line separator to be Unix-style '\n'.static voidwriteToFile(@NotNull File file, @NotNull String content) Creates a new text file or replaces the content of an existing file.
-
构造器详细资料
-
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 tocontent- the new content of the file- 抛出:
IOException- if an I/O error occurs
-