I am using the FileSystemWatcher class to monitor a file for resizing. Software that writes to a file keeps the stream open and writes every five seconds.
The event is changedtriggered only when you open Windows Explorer and click update to force Windows to update the specified file size. (Windows 7 specifically).
I know that FileSystemWatcher is a kind of pokey, but are there any solutions here other than periodically polling a file using FileInfo ? For instance. Can I get Windows to update file statistics more often?
Note that the Modified Out timestamp is never updated after the recording software opens the file descriptor. Not sure if Windows is using updates to the ModifiedAt stamp to cause recalculation of other file parameters. I tried all NotifyFilters and no one starts without forcing Windows to update the statistics of its files.
Applies to: At what time files are updated in windows
source
share