Closing Open Files using C#

前端 未结 3 1156
情深已故
情深已故 2021-01-05 16:53

I have a situation where people are connected to files on a share and it\'s blocking me from overwriting the file. I\'m trying to write a method that will look to see if a f

3条回答
  •  失恋的感觉
    2021-01-05 17:26

    It would be difficult to consider all the ramifications of doing this because you can't necessarily predict the resulting behavior of the application that currently has the file locked.

    Is there some other way to do this? For example do you have to overwrite the file right away, or can you have some external process that continually tries to overwrite the file every few minutes until it succeeds?

提交回复
热议问题