FileSystemWatcher Class

Sep 25, 2006

I just found the FileSystemWatcher class in the System.IO namespace. It provides the functionality to listen on the file system for changes on a file or directory. The class fires a couple of events: Changed, Created, Deleted and Renamed.

I didn’t know of this class until now. I always thought one had to write a service to accomplish something like this! Definitely very useful!