Is it possible to identify what process is changin

2019-02-28 04:46发布

问题:

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.