Describe the bug
If the user has a DataStream with Length equals to zero, calling to WriteTo(path) will not create an empty file.
To Reproduce
Steps to reproduce the behavior:
Create a new empty DataStream
Call to WriteTo(string path)
An empty file is not created in path.
Expected behavior
There is an empty file at the given location. The reason is that we use internally a LazyFileStream so it won't call to the FileStream constructor unless a write operation is done.
Additional context
We should consider applying the fix to DataStreamFactory.FromFile instead so it behaves like the constructor of FileStream.
Describe the bug If the user has a
DataStream
withLength
equals to zero, calling toWriteTo(path)
will not create an empty file.To Reproduce Steps to reproduce the behavior:
DataStream
WriteTo(string path)
path
.Expected behavior There is an empty file at the given location. The reason is that we use internally a
LazyFileStream
so it won't call to theFileStream
constructor unless a write operation is done.Additional context We should consider applying the fix to
DataStreamFactory.FromFile
instead so it behaves like the constructor ofFileStream
.