如何在 C# 中监控文件访问
我想检测特殊目录的文件系统中的更改,我听说可以监视文件访问。谁能告诉我如何在 C#.NET 中监视目录?
谢谢 雷内
i want to detect changes in filesystem for a special directory and i heard that is possible to monitor the file-access. Can anyone tell me how to monitor a directory for example in C#.NET?
THX
Rene
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要
FileSystemWatcher
。MSDN 上的完整文档位于:http://msdn.microsoft。 com/en-us/library/system.io.filesystemwatcher.aspx
You need the
FileSystemWatcher
.Full documentation on MSDN is here: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
有一个
FileSystemWatcher
类。据我所知,这不适用于 Novell Network 共享(至少我上次尝试时是这样,几年前)。
There is a
FileSystemWatcher
class.As far as I know this does not work on Novell Network shares (at least the last time I tried it, some years ago).