diff --git a/BeefLibs/corlib/src/IO/File.bf b/BeefLibs/corlib/src/IO/File.bf index 555a6d95..31ef4530 100644 --- a/BeefLibs/corlib/src/IO/File.bf +++ b/BeefLibs/corlib/src/IO/File.bf @@ -107,7 +107,7 @@ namespace System.IO return .Ok; } - public static Result WriteAllLines(StringView path, IEnumerator enumerator) + public static Result WriteAllLines(StringView path, IEnumerator enumerator, bool doAppend = false) { String strBuf = scope String(); for (var str in enumerator) @@ -115,10 +115,10 @@ namespace System.IO strBuf.Append(str); strBuf.Append(Environment.NewLine); } - return WriteAllText(path, strBuf); + return WriteAllText(path, strBuf, doAppend); } - public static Result WriteAllLines(StringView path, IEnumerator enumerator) + public static Result WriteAllLines(StringView path, IEnumerator enumerator, bool doAppend = false) { String strBuf = scope String(); for (var str in enumerator) @@ -126,7 +126,7 @@ namespace System.IO strBuf.Append(str); strBuf.Append(Environment.NewLine); } - return WriteAllText(path, strBuf); + return WriteAllText(path, strBuf, doAppend); } /*public static Result>> ReadLines(String fileName)