I am looking for a reliable way to find directory changes.
I tried using FileSystemWatcher, but it is pretty inaccurate when many small files are created, modified or deleted. In my tests, it skips about 1 or 2% of the files. This is quite a lot when you quickly add or change thousands of files.
I tried polling for changes at different intervals of 500 ms, 2000 ms, etc. In this case, I get too many hits. This may have something to do with resolving the timestamps of a FileInfo object.
So my question is; Is it possible using the .NET Framework to reliably get changes to a directory?
- Christian
source
share