brandeded
brandeded

Reputation: 2189

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

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

Upvotes: 4

Views: 5368

Answers (2)

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

Upvotes: 6

Tejs
Tejs

Reputation: 41236

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.

Upvotes: 2

Related Questions