FileSystemWatcher files in subdirectory
问题 I'm trying to be notified if a file is created, copied, or moved into a directory i'm watching. I only want to be notified about the files though, not the directories. Here's some of the code I currently have: _watcher.NotifyFilter = NotifyFilters.FileName; _watcher.Created += new FileSystemEventHandler(file_created); _watcher.Changed += new FileSystemEventHandler(file_created); _watcher.Renamed += new RenamedEventHandler(file_created); _watcher.IncludeSubdirectories = true; _watcher