C#: Monitoring copied or moved files with FileSystemWatcher

后端 未结 4 1307
醉梦人生
醉梦人生 2021-02-02 03:17

I have come across several \"solutions\" here and across the web but none seem to fit the bill.

What I am looking to do is have an app monitor a folder for new files (ei

4条回答
  •  孤城傲影
    2021-02-02 03:50

    I know, that what I am going to tell you does not look elegant. I had also to monitor files that arrive from different places, some of them were large and some small. We found out, that FileSystemWatcher is not reliable for this purpose. If you want to be 100% sure, you can check once in a while, using Timer class and its Elapsed event.

提交回复
热议问题