Handling with temporary file stream

前端 未结 5 970
南方客
南方客 2021-01-02 22:47

Say I want to define a TempFileStream class that creates a temporary file using Path.GetTempFileName() method. A temporary file must be deleted when TempFileStream\'s object

5条回答
  •  遥遥无期
    2021-01-02 23:20

    Basically according to TempFileStream logic you always use just created file with unique name (that is what Path.GetTempFileName does) and you always delete it after its use. So there is no need to provide constructor that accepts FileMode as you always use it in the same mode.

提交回复
热议问题