Filesystem watcher and large files

后端 未结 5 460
感情败类
感情败类 2020-12-02 21:42
var fsw = new FileSystemWatcher(sPath, \"*.PPF\");
fsw.NotifyFilter = NotifyFilters.FileName;
fsw.IncludeSubdirectories = true;
fsw.Created += FswCreated;
fsw.Enable         


        
5条回答
  •  臣服心动
    2020-12-02 22:18

    AFAIK you don't get notified once the copy is done, you can implement a retry mechanism.
    If you get a shearing violation just trigger a timer to retry the operation in X seconds.
    The second retry should be after X*2 seconds and so on (with some limitation of course).

提交回复
热议问题