How can I watch a file system directory to see when files are added to it?

前端 未结 1 1775
南笙
南笙 2021-01-20 16:15

In c# winforms application, I want to choose a directory from network and after that, when any body put a file in it, I want to see a message such as \"A file added.\"

相关标签:
1条回答
  • 2021-01-20 17:11

    You could use the FileSystemWatcher class and subscribe for different events happening on the file system such as files and folders being created, deleted, modified, ...

    0 讨论(0)
提交回复
热议问题