I have a set of files and I would like to monitor them for changes.
I have tried FileSystemWatcher class, but it seems notifications are fired after file is changed and then saved. Say, if I monitor directory for changes in .txt files, open some file, save it FileSystemWatcher works. But how can I monitor changes when the file is opened and something is typed without saving? Reading original first and then reading the same file after some interval and then comparing them seems slow and stupid. Is there a nice way to monitor such situation?
No, because the file itself hasn't changed yet.