*
This commit is contained in:
1 parent
2b3e6e211a
commit
1036bc9642
1 file changed
+3
-3
+3
-3
@@ -5,7 +5,7 @@ public static class FileUtils {
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 写入文件。
|
/// 写入文件。
|
||||||
/// 如果文件或文件夹不存在,则会自动创建。
|
/// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Write(string filePath, string text, Encoding? encoding = null) {
|
public static void Write(string filePath, string text, Encoding? encoding = null) {
|
||||||
DirectoryUtils.Create(filePath, isFilePath: true);
|
DirectoryUtils.Create(filePath, isFilePath: true);
|
||||||
@@ -14,7 +14,7 @@ public static class FileUtils {
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 写入文件。
|
/// 写入文件。
|
||||||
/// 如果文件或文件夹不存在,则会自动创建。
|
/// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Write(string filePath, byte[] content) {
|
public static void Write(string filePath, byte[] content) {
|
||||||
DirectoryUtils.Create(filePath, isFilePath: true);
|
DirectoryUtils.Create(filePath, isFilePath: true);
|
||||||
@@ -24,7 +24,7 @@ public static class FileUtils {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将 <paramref name="stream" /> 写入文件。
|
/// 将 <paramref name="stream" /> 写入文件。
|
||||||
/// 会将流的位置主动重置到开头。
|
/// 会将流的位置主动重置到开头。
|
||||||
/// 如果文件或文件夹不存在,则会自动创建。
|
/// 如果文件或文件夹不存在,则会自动创建。若已存在,则会覆盖原文件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Write(string filePath, Stream stream) {
|
public static void Write(string filePath, Stream stream) {
|
||||||
DirectoryUtils.Create(filePath, isFilePath: true);
|
DirectoryUtils.Create(filePath, isFilePath: true);
|
||||||
|
|||||||
Reference in new issue
Block a user