C# FileSystemWatcher, How to know file copied completely into the watch folder

后端 未结 7 1197
予麋鹿
予麋鹿 2020-12-06 20:14

I am developing a .net application, where I am using FileSystemWatcher class and attached its Created event on a folder. I have to do action on this event (i.e. copy file to

7条回答
  •  旧巷少年郎
    2020-12-06 20:33

    You could listen for the modified event, and start a timer. If the modified event is raised again, reset the timer. When the timer has reached a certain value without the modify event being raised you can try to perform the copy.

提交回复
热议问题