mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-14 12:15:05 +00:00
feat: add CSV Writer
This commit is contained in:
@@ -89,5 +89,11 @@ namespace ICD.Common.Utils.IO
|
||||
{
|
||||
return new IcdFileStream(File.Create(path));
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public static IcdStreamWriter AppendText(string path)
|
||||
{
|
||||
return new IcdStreamWriter(File.AppendText(path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
22
ICD.Common.Utils/IO/IcdStreamWriter.cs
Normal file
22
ICD.Common.Utils/IO/IcdStreamWriter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
#elif STANDARD
|
||||
using System.IO;
|
||||
#endif
|
||||
|
||||
namespace ICD.Common.Utils.IO
|
||||
{
|
||||
public sealed class IcdStreamWriter : IcdTextWriter
|
||||
{
|
||||
public StreamWriter WrappedStreamWriter { get { return WrappedTextWriter as StreamWriter; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="baseStreamWriter"></param>
|
||||
public IcdStreamWriter(StreamWriter baseStreamWriter) : base(baseStreamWriter)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user