2009-11-16 Gonzalo Paniagua Javier * DefaultWatcher.cs: patch by James P. Mitchel III. The change corrects an instance of unsynchronized access to shared state and is probably the intent of the original code. 2009-09-30 Marek Habersack * InotifyWatcher.cs: optimized the Renamed event child update loop in the previous commit for directories in ProcessEvents. 2009-09-30 Gonzalo Paniagua Javier * InotifyWatcher.cs: fixes bug #322330. Patch by Alexander Kojevnikov. This patch fixes the issues reported by the OP and in my previous comment. In particular: Hunks 1 and 4 remove the new_name_needed flag, it's not used anywhere and only adds confusion. Hunk 2 skips DeleteSelf event for sub-directories, they receive the Delete event anyway. Hunk 3 makes sure that we use a combination of Deleted+Created notifications instead of a single Renamed notification, if the watched item has been moved from one directory to another. This is because RenamedEventArgs supports only one directory name: FullPath is always directory+name, OldFullPath is always directory+old_name. Hunk 5 updates relevant InotifyData instances with the new directory name. Without this, notifications always use the original folder names. The last hunk may be a bit slow as it needs to iterate on all the InotifyData instances. On the other hand, we are already doing it on the Delete event (lines 560:568) and by default inotify allows only 8192 watches per user. 2009-07-13 Gonzalo Paniagua Javier * InotifyWatcher.cs: when a watched subdirectory is deleted, remove it from the list of children and only raise an event if it matches the filter. 2009-06-04 Marek Habersack * InotifyWatcher.cs: filter pattern should be matched on file name alone, not on the relative path of the file triggering the event. Fixes bug #509998 2009-03-11 Gonzalo Paniagua Javier * InotifyWatcher.cs: don't send events when a directory is created unless it matches the pattern. Fixes bug #484082. 2009-01-26 Marek Habersack * SearchPattern.cs: make IsMatch work for situations when there is no wildcard in the pattern, but a subdirectory match is being tested, e.g. pattern == "file.txt" and text == "subdir/file.txt". Lack of support for this has been causing watching for changes to ASP.NET's web.config in subdirectories to fail. 2008-11-06 Jonathan Chambers * MonoIO.cs : Add DuplicateHandle. 2008-10-02 Gonzalo Paniagua Javier * InotifyWatcher.cs: IN_CLOSE_WRITE is triggered when a writable file is closed, but that does not mean that the file was actually modified. Fixes bug #323188. 2008-09-08 Rodrigo Kumpera * InotifyWatcher.cs: Really fix #359181. 2008-09-01 Dick Porter * InotifyWatcher.cs: Revert fix for bug 322330, as it is somehow breaking other stuff. 2008-06-20 Dick Porter * InotifyWatcher.cs: If a directory is renamed, make sure the old version is removed from the requests hash. Fixes bug 322330. 2008-06-18 Rodrigo Kumpera * InotifyWatcher.cs: patch from Juraj Skripsky to fix rename events (fixes bug #359181). 2008-04-17 Marek Habersack * FileSystemWatcher.cs: added support for NullFileWatcher. Fixes bug #354701 * NullFileWatcher.cs: added an IFileWatcher implementation which does nothing. Selected only by setting the MONO_MANAGED_WATCHER environment variable to 'disabled'. Fixes bug #354701 Tue Mar 11 14:29:22 CET 2008 Paolo Molaro * InotifyWatcher.cs: patch from Anders Rune Jensen (anders@iola.dk) to reduce memory usage (fixes bug #362147). 2007-11-06 Sebastien Pouliot * InvalidDataException.cs: Added private ctor for serialization. Fix bug #324569. 2007-10-30 Robert Jordan * MonoSyncFileStream.cs: Add. 2007-07-19 Juraj Skripsky * FileSystemWatcher.ch (RaiseEvent): Invoke delegate directly, we don't need the extra control provided by using GetInvocationList(). 2006-11-01 Sebastien Pouliot * ErrorEventHandler.cs: Remove [Serializable] in NET_2_0. * FileSystemEventHandler.cs: Remove [Serializable] in NET_2_0. * FileSystemWatcher.cs: Add missing attributes for NET_2_0. * InvalidDataException.cs: Seal class and remove serialization ctor. * NotifyFilters.cs: Remove [Serializable] in NET_2_0. * RenamedEventHandler.cs: Remove [Serializable] in NET_2_0. * WatcherChangeTypes.cs: Remove [Serializable] in NET_2_0. 2006-10-04 Gonzalo Paniagua Javier * InotifyWatcher.cs: workaround for a weird case. Someone is watching /dev with recursion enabled and the inotify file descriptor shows up as a directory that fails to open. Already reported to Robert Love. 2006-09-05 Gonzalo Paniagua Javier * InotifyWatcher.cs: fix file names for the rename event. * FileSystemWatcher.cs: ignore exceptions that happen when invoking event handlers. 2006-08-21 Gonzalo Paniagua Javier * InotifyWatcher.cs: handle CloseWrite, as it might happen without other modify events. 2006-08-16 Gonzalo Paniagua Javier * FileSystemWatcher.cs: avoid argument null when we don't know yet the target of a rename. 2006-08-03 Gonzalo Paniagua Javier * InotifyWatcher.cs: warn about inotify user watches limit. 2005-07-31 Sebastien Pouliot * FileSystemWatcher.cs: Add an EnvironmentPermission assert to read environment variable MONO_MANAGED_WATCHER. 2006-07-25 Gonzalo Paniagua Javier * FAMWatcher.cs: remove unused method. * InotifyWatcher.cs: new watcher supporting inotify directly, as there are some distros that do not install 'gamin' anymore. This new watcher takes priority over gamin, fam and default. * FileSystemWatcher.cs: support for the new watcher. 2006-04-10 Gonzalo Paniagua Javier * FAMWatcher.cs: fix race condition when a directory is created and populated before we start monitoring it. Patch by Thong Nguyen. 2006-04-06 Gonzalo Paniagua Javier * FAMWatcher.cs: add new directories to the hashtable after start monitoring them, otherwise the ReqNum is not set. Fixes bug #77971. 2006-01-05 Gonzalo Paniagua Javier * FAMWatcher.cs: fix arraylist access when a new directory is added and the new directory is watched too. Closes bug #77068. 2005-12-01 Gonzalo Paniagua Javier * FAMWatcher.cs: * FileSystemWatcher.cs: use libgamin-1.so.0 instead of libfam.so.0 when the runtime finds libgamin. On SUSE libgamin and libfam are not the same libraries (on debian, they are just the same and there's no fam-server). 2005-06-25 Gonzalo Paniagua Javier * FAMWatcher.cs: reverting my patch. Seems that something got changed in gamin. 2005-06-25 Gonzalo Paniagua Javier * FAMWatcher.cs: make this really inactive when there are no events to process. 2005-05-28 Gonzalo Paniagua Javier * FAMWatcher.cs: move the call to StartMonitoringDirectory out of any locks. Before, for a high amount of subdirectories (~500) it hanged after filling the write buffer of FAM socket. Fixes bug #74398. 2005-04-05 Lluis Sanchez Gual * FAMWatcher.cs: Fix cast exception when disposing watchers. 2005-03-30 Geoff Norton * KeventWatcher.cs: Fix a file handle leak on raised events. 2005-02-10 Lluis Sanchez Gual * DefaultWatcher.cs: Fix nullref exception when the object is disposed without any watcher. 2004-12-03 Geoff Norton * SearchPattern.cs: Have IsMatch(string) call IsMatch(string, bool) to avoid setting a instance variable in a method that logically should not be changing it. 2004-12-02 Geoff Norton * KeventWatcher.cs: Add IDisposable to our kevent struct so the disposer gets called. Fixes a small memory leak. Dont monitor LastAccessedTime for changed files, as this will cause AppUnloading in XSP when global.asax is accessed after creation. Use a case-insensitive IsMatch to deal with OSX Case-aware/Case-insensitive filesystem. * SearchPattern.cs: Add a overload to IsMatch to explicitly set the ignore field for OSX case-aware yet case-insensitive filesystem. This allows monitoring of global.asax to happen properly. 2004-11-29 Gonzalo Paniagua Javier * DefaultWatcher.cs: make it work when the FileMask does not have wildcards and we're watching a directory. 2004-11-22 Ben Maurer * DefaultWatcher.cs: Copy the hashtable when we scan for changes so that you can make modifications in a handler. Fixes 65966. 2004-11-19 Geoff Norton * KeventWatcher.cs: Dont marshal a string to a struct that the kernel will hold; this causes a double free bug. Marshal it as a IntPtr and clean it up in the dispose method. Don't pass FullName to the pattern matcher, pass the filename. Fixes bug #69692. 2004-10-07 Gonzalo Paniagua Javier * DefaultWatcher.cs: if the file is removed between reading the directory and filling the file info, catch the exception and ignore the file. Fixes bug #59482. 2004-10-07 Gonzalo Paniagua Javier * DefaultWatcher.cs: don't use Directory.GetFileSystemEntries when the pattern has no wildcards. Fixes bug #67447. 2004-09-04 Gonzalo Paniagua Javier * FAMWatcher.cs: s/fam/libfam.so.0/ so that g_module finds it even when the development package is not installed. 2004-08-06 Geoff Norton * FileSystemWatcher.cs: Use the new KeventWatcher if its supported * KeventWatcher.cs: Added to cvs 2004-06-24 Gonzalo Paniagua Javier * DefaultWatcher.cs: fixed subdirectories notifications and don't fail when any directory is removed. Closes bug #59840. 2004-05-09 Atsushi Enomoto * FileSystemWatcher.cs : csc build fix. Duplicate name between class field and local variable. (already filed in bugzilla #47991). 2004-05-09 Gonzalo Paniagua Javier * DefaultWatcher.cs: * FAMWatcher.cs: use MangledFilter instead of Filter. * FileSystemWatcher.cs: added MangledFilter and finalizer. * SearchPattern.cs: fixed the case when the pattern is "*". 2004-03-30 Gonzalo Paniagua Javier * FAMWatcher.cs: support monitoring subdirectories. FAM doesn't do that, so we have to register the existing directories and add the new ones that might be created. * SearchPattern.cs: provide the pattern when it's wrong. 2004-03-25 Gonzalo Paniagua Javier * SearchPattern.cs: small improvement for files with no wildcard. 2004-01-27 Nick Drochak * FAMWatcher.cs: * FileSystemWatcher.cs: Remove unused variables. Eliminates a couple of build warnings. 2004-01-26 Gonzalo Paniagua Javier * DefaultWatcher.cs: fixed condition for removal from the watches list. 2004-01-26 Gonzalo Paniagua Javier * DefaultWatcher.cs: check if the FileSystemWatcher is in WaitForChange and call Monitor.PulseAll in that case. 2004-01-21 Gonzalo Paniagua Javier * DefaultWatcher.cs: implemented. * FAMWatcher.cs: don't stop the thread when we add a new watch. * FileSystemWatcher.cs: on windows we use the default watcher by now. 2004-01-16 Gonzalo Paniagua Javier * DefaultWatcher.cs: stub for the default watcher. * WindowsWatcher.cs: stub for the windows watcher. * FAMWatcher.cs: FAM watcher. * FileAction.cs: enum with event types. * FileSystemEventArgs.cs: added SetName property. * FileSystemWatcher.cs: added support for the 3 watchers. * IFileWatcher.cs: interface implemented by the watchers. * SearchPattern.cs: copied from corlib. 2003-07-17 Andreas Nahr * FileSystemWatcher.cs: Reworked attributes based on the new Consts scheme 2003-07-13 Andreas Nahr * FileSystemWatcher.cs: Added missing attributes 2003-07-09 Andreas Nahr * IODescriptionAttribute.cs: Removed unneeded field 2003-05-16 Dick Porter * MonoIO.cs: Implement GetTempPath 2003-03-17 Gonzalo Paniagua Javier * FileSystemWatcher.cs: added attributes and some more implementation. Now only the guts left to do. * FileSystemEventArgs.cs: * RenamedEventArgs.cs: implemented a couple of properties. 2002-10-31 Dick Porter * MonoIO.cs: Return the error status in a parameter, as the GetLastError() value has long since been blown away if we try and look it up in a subsequent internal call invocation. 2002-09-15 Duncan Mak * FileSystemWatcher.cs (FileSystemWatcher): Fixed the null-param constructor. 2002-08-28 Gonzalo Paniagua Javier * FileSystemWatcher.cs: IDisposable fixes. 2002-08-23 Gonzalo Paniagua Javier * InternalBufferOverflowException.cs: * NotifyFilters.cs: * WatcherChangeTypes.cs: little fixes based on class status page. 2002-08-15 Tim Coleman * ErrorEventArgs.cs: * ErrorEventHandler.cs: * FileSystemEventArgs.cs: * FileSystemEventHandler.cs: * FileSystemWatcher.cs: * InternalBufferOverflowException.cs: * IODescriptionAttribute.cs: * NotifyFilters.cs: * RenamedEventArgs.cs: * RenamedEventHandler.cs: * WaitForChangedResult.cs: * WatcherChangeTypes.cs: New stubs added. 2002-07-20 Dick Porter * MonoIO.cs: Cut down copy of corlib/System.IO/MonoIO.cs, so it can be used from the System assembly but still not be exposed to users.