1
0
mirror of synced 2024-12-12 07:41:11 +01:00
Switch-Toolbox/Switch_Toolbox_Library/IO/Extensions/StreamExport.cs

21 lines
505 B
C#
Raw Normal View History

2019-08-17 15:58:17 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Toolbox.Library.IO
{
public static class StreamExport
{
public static void ExportToFile(this Stream stream, string fileName)
{
using (var fileStream = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.Write))
{
stream.CopyTo(fileStream);
}
}
}
}