I have created a File watcher for watching the directory and files, here I could get a change event when files are replaced. but for directory only created event triggers not replaced event. How to get the event of replaced on directory replace? my added events
watcher = new FileSystemWatcher();
watcher.Path = folder+@"INPUT\";
watcher.NotifyFilter = System.IO.NotifyFilters.DirectoryName;
watcher.NotifyFilter = watcher.NotifyFilter | System.IO.NotifyFilters.FileName;
watcher.NotifyFilter = watcher.NotifyFilter | System.IO.NotifyFilters.Attributes;
watcher.Changed += new FileSystemEventHandler(eventRaised);
watcher.Created += new FileSystemEventHandler(eventRaised);
watcher.IncludeSubdirectories = true;
watcher.EnableRaisingEvents = true;
watcher.Error += new ErrorEventHandler(OnError);