Class StringToFileWriter
IO Utility class to write to file that implements IDisposable interface.
Suggest to use this objects of this class within the using
keyword
so that file-resources are automatically freed in case your code is terminated before
it has completed.
Implements
Inherited Members
Namespace: TimeSeriesAnalysis.Utility
Assembly: TimeSeriesAnalysis.dll
Syntax
public class StringToFileWriter : IDisposable
Constructors
| Edit this page View SourceStringToFileWriter(string)
Constructor with local encodign
Declaration
public StringToFileWriter(string filename)
Parameters
Type | Name | Description |
---|---|---|
string | filename |
StringToFileWriter(string, Encoding)
Constructor with specific encoding
Declaration
public StringToFileWriter(string filename, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
string | filename | file to be creates |
Encoding | encoding | text encoding format |
Methods
| Edit this page View SourceClose()
Close file handles
Declaration
public bool Close()
Returns
Type | Description |
---|---|
bool |
CreateDirectoryStructure(string)
creates directory on path if it does not exist
Declaration
public void CreateDirectoryStructure(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
string | FilePath |
Dispose()
Disposes
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Write(string)
Write a single line of text
Declaration
public void Write(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text |