[Mono-bugs] [Bug 394422] New: FileSystemWatcher "Renamed" event doesn't work on Windows

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 26 05:10:53 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=394422


           Summary: FileSystemWatcher "Renamed" event doesn't work on
                    Windows
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: PascalFresnay at free.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other


Description of Problem:
Event "Renamed" from System.IO.FileSystemWatcher doesn't work on Windows

Steps to reproduce the problem:
Compile and run this code :
 FileSystemWatcher fsw = new FileSystemWatcher();
fsw.Path = Path.GetTempPath();
string filePath = Path.GetTempFileName();
fsw.Renamed += delegate(object sender, RenamedEventArgs e) {
Console.WriteLine("Renamed :" + e.Name); };
fsw.EnableRaisingEvents = true;
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
File.AppendAllText(filePath, "blabla");
File.Move(filePath, filePath + "2");
Console.ReadLine();

Actual Results:
Nothing append

Expected Results:
print renamed filename.

How often does this happen? 
every time.

Additional Information:
A quick watch to DefaultWatcher implementation indicate that Renamed event is
not handle at all.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list