Пример #1
0
 public static async Task Write(string filePath, string content, bool overwrite = IOHelper.DefaultOverwriteValue)
 {
     using (var writer = StreamWriterHelper.NewWrite(filePath, overwrite))
     {
         await writer.WriteAsync(content);
     }
 }
Пример #2
0
 public static async Task WriteAllLines(string filePath, IEnumerable <string> lines, string lineSeparator, bool overwrite = IOHelper.DefaultOverwriteValue)
 {
     using (var writer = StreamWriterHelper.NewWrite(filePath, overwrite))
     {
         await StreamWriterHelper.WriteAllLines(writer, lines, lineSeparator);
     }
 }