|
|
@@ -5,7 +5,7 @@ public static class FileUtils {
|
|
|
|
|
|
/// <summary>
|
|
|
/// 写入文件。
|
|
|
- /// 如果文件或文件夹不存在,则会自动创建。
|
|
|
+ /// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
|
|
/// </summary>
|
|
|
public static void Write(string filePath, string text, Encoding? encoding = null) {
|
|
|
DirectoryUtils.Create(filePath, isFilePath: true);
|
|
|
@@ -14,7 +14,7 @@ public static class FileUtils {
|
|
|
|
|
|
/// <summary>
|
|
|
/// 写入文件。
|
|
|
- /// 如果文件或文件夹不存在,则会自动创建。
|
|
|
+ /// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
|
|
/// </summary>
|
|
|
public static void Write(string filePath, byte[] content) {
|
|
|
DirectoryUtils.Create(filePath, isFilePath: true);
|
|
|
@@ -24,7 +24,7 @@ public static class FileUtils {
|
|
|
/// <summary>
|
|
|
/// 将 <paramref name="stream" /> 写入文件。
|
|
|
/// 会将流的位置主动重置到开头。
|
|
|
- /// 如果文件或文件夹不存在,则会自动创建。
|
|
|
+ /// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
|
|
/// </summary>
|
|
|
public static void Write(string filePath, Stream stream) {
|
|
|
DirectoryUtils.Create(filePath, isFilePath: true);
|