[Mono-bugs] [Bug 81896][Wis] New - FileSystemWatcher events do not fire
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jun 18 12:43:54 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kobruleht2 at hot.ee.
http://bugzilla.ximian.com/show_bug.cgi?id=81896
--- shadow/81896 2007-06-18 12:43:54.000000000 -0400
+++ shadow/81896.tmp.32430 2007-06-18 12:43:54.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 81896
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: kobruleht2 at hot.ee
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: FileSystemWatcher events do not fire
+
+To reproduce, run code.
+
+Expected: message box should appear
+
+Observed: message box does not appear.
+
+Enironment:
+
+MONO 1.2.4 .Net 2 profile
+Windows XP
+
+Code to reproduce:
+
+using System;
+using System.Windows.Forms;
+using System.IO;
+
+class main {
+ [STAThreadAttribute()]
+ public static void Main() {
+
+ File.Delete("c:\\test");
+ FileSystemWatcher watch = new FileSystemWatcher();
+ watch.Path = "c:\\";
+ watch.Filter = "test";
+ watch.Created += OnChanged;
+ watch.Deleted += OnChanged;
+ watch.Changed += OnChanged;
+ watch.EnableRaisingEvents = true;
+
+ FileStream oFs = new FileStream("c:\\test",
+FileMode.CreateNew, FileAccess.ReadWrite);
+ StreamWriter oWriter = new StreamWriter(oFs);
+ oWriter.Flush();
+ oWriter.Close();
+ oFs.Close();
+ File.Delete("c:\\test");
+ Application.Run(new Form());
+ }
+
+ static void OnChanged(object sender, FileSystemEventArgs e) {
+ MessageBox.Show(e.FullPath + e.ChangeType.ToString());
+ }
+}
More information about the mono-bugs
mailing list