FileSystemWatcher vs polling to watch for file changes

后端 未结 13 2299
一个人的身影
一个人的身影 2020-11-22 05:44

I need to setup an application that watches for files being created in a directory, both locally or on a network drive.

Would the FileSystemWatcher or p

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 06:16

    Also note that file system watcher is not reliable on file shares. Particularly if the file share is hosted on a non-windows server. FSW should not be used for anything critical. Or should be used with an occasional poll to verify that it hasn't missed anything.

提交回复
热议问题