I work in C # and am looking for a way to create a directory path that will be displayed in IO.Stream, and not in the actual file system.
I want to be able to “save” files to this path, manage the contents or file names, and then save them from this path to a regular file in the file system.
I know I can use a temporary file, but I would prefer to use memory for both security and performance.
This view exists according to this answer , in Java , using FileSystemProvider . I am looking for a way to do this in C #.
I tried every search that I could think of, and came up with only a Java answer and suggestions for using temporary files.
Is this possible with .net?
Basically, I'm looking for a way to enable saving files directly to memory, as if they were saved on a file system. so, for example, if I had a third-party class that provides a save method ( save(string fullPath) ) or something like SmtpServer.Send(MyMsg) in this question , I could select this path and save it in the memory stream, not on disk. (the main thing is that I want to provide a path that will lead directly to a memory stream ).
source share