FileStream with DeleteOnClose File option

后端 未结 3 1886
滥情空心
滥情空心 2021-02-08 14:23

In my project I have to create some temp files in an USB device, which I want to delete on Closing. So I used a code like

this.fcommandHandler = new FileStream(T         


        
3条回答
  •  滥情空心
    2021-02-08 14:45

    Use FileOptions.DeleteOnClose | FILE_FLAG_NO_BUFFERING the & cancels them out.

    FILE_FLAG_NO_BUFFERING & FileOptions.DeleteOnClose returns FileOptions.None

提交回复
热议问题