C # FileSystemWatcher does not intercept Perforce revert
In addition to checking the NotifyFilters, make sure you bind handlers to all events that the FileSystemWatcher. FileSystemWatcher has events for Modified, Created, Deleted, and Renamed.
If you only bind to the Changed event and don't catch any events, it sounds like Perforce can delete and recreate the file. If so, add handlers to deleted and modified events.
The NotifyFilters documentation in msdn has a sample code showing how to handle all events.
source to share
Have you configured the NotifyFilters correctly? From FileSystemWatcher Help ...
There are several types of changes that you can observe in a directory or file. For example, you can keep track of changes to attributes, the date and time of LastWrite, or the size of files or directories. This is done by setting the NotifyFilter property to one of the NotifyFilters values.
A Perforce revert can also revert to a previous LastWrite time, which if you are only looking for an earlier timestamp will not trigger an update.
source to share