Is it possible to identify what process is changing a file with FileSystemWatcher?

风格不统一 提交于 2019-11-27 19:34:48

问题


Is it possible to use the FileSystemWatcher to find the PID or process name that is changing a file?


回答1:


Nope, you need a file system filter driver to track changes with such details.




回答2:


Negative. The only information you will have is the data contained in the FileSystemEventArgs class, documented here.

This means you only get the type of change that was made, as well as the path to the file that was changed.



来源:https://stackoverflow.com/questions/7248812/is-it-possible-to-identify-what-process-is-changing-a-file-with-filesystemwatche

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!