[英]How to monitor Fileaccess in C#
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? 谁能告诉我如何在C#.NET中监视目录?
THX Rene THX Rene
You need the FileSystemWatcher
. 你需要FileSystemWatcher
。
Full documentation on MSDN is here: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx 有关MSDN的完整文档,请访问: http : //msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
There is a FileSystemWatcher
class . 有一个FileSystemWatcher
类 。
As far as I know this does not work on Novell Network shares (at least the last time I tried it, some years ago). 据我所知,这不适用于Novell Network的股票(至少在几年前我最近一次尝试过它)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.