FileSystemWatcher event trigger problem(s)

Posted by Bahadir Cambel on Stack Overflow See other posts from Stack Overflow or by Bahadir Cambel
Published on 2010-04-15T15:37:31Z Indexed on 2010/04/15 15:43 UTC
Read the original article Hit count: 243

Filed under:
|
|

It seems like , FileSystemWatcher triggers events more than once. Here is my settings ;

 watcher = new FileSystemWatcher();
 watcher.Path = @"D:\testSpace";
 watcher.InternalBufferSize = 1024*64;
 watcher.Deleted += Triggered;
 watcher.Changed += Triggered;
 watcher.Created += Triggered;
 watcher.Error += ErrorOccured;
 watcher.NotifyFilter = NotifyFilters.LastWrite;
 watcher.IncludeSubdirectories = true;

 watcher.EnableRaisingEvents = true; 

One more thing that I found out that , new folder created event does not get triggered unless a new file created under the folder.

do you guys know any work around for these issues ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about filesystemwatcher