FileSystemWatcher OnOpened Event

In .Net, how can I track if a file was accessed by other (open) files? I do not see the OnOpened event in FileSystemWatcher, so I assume that it cannot do this. Is there any other way to do this? Obviously there is some kind of hook available on Windows from .Net?

+3
source share
2 answers

Check the NotifyFilters property. You will probably want to find changes in the access date / time.

+4
source

The NotifyFilters enumeration has an interesting meaning: LastAccess indicates access to the last file or directory. This should be set to the NotifyFilter property.

+2
source

All Articles