Handling multiple Change Events in FileSystemWatcher

后端 未结 7 1666
别跟我提以往
别跟我提以往 2021-02-10 09:33

I have the following sub:

  Private Sub Watcher_Changed(ByVal sender As System.Object, ByVal e As FileSystemEventArgs)
        If Path.GetExtension(e.Name) = \".         


        
7条回答
  •  温柔的废话
    2021-02-10 10:04

    I ran into the exact situation before, and ended up implementing a timer mechanism to wait for the file to "settle", or for write events to stop coming in for x amount of time.

    A bit kludgy, but it worked.

提交回复
热议问题