I wanted to use the FileStream class to avoid saving any files to the client computer. But every FileStream constructor requires a path to the file.
How to create a FileStream from a stream and not save it to your hard drive?
EDIT: I already use memystream to store my information. But at some point I need to zip files into ANOTHER FLOW. The problem is that the zip commands (I looked at GZipStream - it fastens the FILES to STREAM) requires me to file filePath (FileStream).
If I can not excel by creating a FileStream from a stream, is there any other way for zip streams?
MemoryStream, , API Stream, FileStream. :
MemoryStream
Stream
FileStream
using(var ms = new MemoryStream()) { YourCode(ms); }
FileStream, temp, Path.GetTempFileName().
Path.GetTempFileName()
(, MemoryStream) FileStream, ( , ).
FileStream works with files. You cannot change this behavior.
You can check other Stream classes inherited from System.IO.Stream, for example, MemoryStream .
System.IO.Stream