471,330 Members | 1,150 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

FileSystemWatcher does not work correctly

Hello,

I've got following sourcecode to watch a single file:

_fileWatcher = new
FileSystemWatcher(Path.GetDirectoryName(xmlWorkflo wResult),
Path.GetFileName(xmlWorkflowResult));
_fileWatcher.IncludeSubdirectories = false;
_fileWatcher.EnableRaisingEvents = true;
_fileWatcher.Created += new
FileSystemEventHandler(this.OnChangedWorkflowResul tXML);
_fileWatcher.Changed += new
FileSystemEventHandler(this.OnChangedWorkflowResul tXML);
_fileWatcher.Deleted += new
FileSystemEventHandler(this.OnChangedWorkflowResul tXML);

Now if I create the watched file, the create event is NOT raised. If I
change the file name to another name and then back to the watched
name, the changed event is NOT raised. BUT: If I delete the watched
file, the delete event is raised.

What could be the problem?

Thank you,
Norbert
Aug 8 '08 #1
0 829

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Long Tran | last post: by
1 post views Thread by Troy Murphy | last post: by
1 post views Thread by John Lee | last post: by
3 posts views Thread by Stampede | last post: by
2 posts views Thread by kmcnet | last post: by
5 posts views Thread by Goran Djuranovic | last post: by
2 posts views Thread by Soulless | last post: by
1 post views Thread by Lila Godel | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.