How to test if a file is fully copied in .NET

后端 未结 9 1275
小鲜肉
小鲜肉 2021-01-17 12:27

I am monitoring a folder for new files and need to process them. The problem is that occasionally file opening fails, because system has not finished copying it.

Wha

9条回答
  •  太阳男子
    2021-01-17 12:37

    If you are using FileSystemWatcher I don't think there's a robust solution to this problem. One approach would be try/catch/retry later.

提交回复
热议问题