I've been working on a program to monitor a network folder to find out which spreadsheets our company uses are the most popular. I'm using the FileSystemWatcher class in C# to do the monitoring. I've noticed I'm getting updates to files that are in folders that my user does not have permission to browse. I understand that my software is subscribing to a list of updates done by other system software and not actually browsing those files itself, but is this functionality intentional or is it a bug?
A:
The FileSystemWatcher is intended to monitor for any changes, not just a user opening the file.
EDIT: I'm pretty sure this is done by design. Think of trying to have a program check a network location for updates. You might not want the user to have access to that file location, but you want to be able to check for file changes, and download new files when they are available.
You may also have programs (like BizTalk) generating or editing files that other programs need to access, so these other programs just sit there and watch for file changes.
smoore
2010-04-02 14:37:45
I understand it can, but all I have it sent to monitor is LastWrite and LastAccess.
Wesley
2010-04-02 15:10:21