* [System] Make FileSystemWatcher backend non-static
The FileSystemWatcher `watcher` field is the backend IFileWatcher that's
supposed to be used for the actual operations.
Each backend has a `bool GetInstance (out watcher)` method that returns a
singleton object, so each new instance of FileSystemWatcher gets the same
IFileWatcher instance. (They will get different `watcher_handle` instances
which are used by some backends to uniquely identify this FileSystemWatcher).
However when the first FileSystemWatcher instance is `Dispose`d, it will set
`watcher = null` which will prevent the remaining instances from calling
watcher?.StopDispatching (watcher_handle);
watcher?.Dispose (watcher_handle);
which means that the backend won't properly cleanup resources for any other FSW
instances that have other `watcher_handle` values.
Addresses https://github.com/mono/mono/issues/16709
* [System.IO] Enable CoreFX FilesystemWatcher on Android
This was the last user of the 'InotifyWatcher' Mono implementation, so this is also removed.
* [csproj] Update project files
Reverted the async delegate firing which is how Caching et al. expect FSW events; and properly handle the multicast case.
Also fixing a typo/regression in @2f1a136583c90cae805441e63b94bc4f277bb953
FileSystemWatcher.cs: Fixed multicast events.
SearchPattern.cs : Fixed issue where case insensitivity was not being honored.
KeventWatcher.cs:
* Fixed several race conditions
* Fixed file descriptor duplication & leaks
* thread-safe/cleaner state transitions for watcher, and much cleaner stopping
* Now uses fsw.Filter parameter and respects IncludeSubdirectories = false. Use fsw.Filter to watch very large trees
* Added more error handling + OnError event
* Lots of behavior/reliability fixes and optimizations for Monitor() loop
* Fixed kevent/timespec struct definitions (for 64-bit build)
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
* 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
svn path=/trunk/mcs/; revision=100953
* FileSystemWatcher.ch (RaiseEvent): Invoke delegate directly, we don't
need the extra control provided by using GetInvocationList().
svn path=/trunk/mcs/; revision=82295
* 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.
svn path=/trunk/mcs/; revision=62972
* 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).
svn path=/trunk/mcs/; revision=53782
* FileSystemWatcher.cs : csc build fix. Duplicate name between class
field and local variable. (already filed in bugzilla #47991).
svn path=/trunk/mcs/; revision=26997
* DefaultWatcher.cs:
* FAMWatcher.cs: use MangledFilter instead of Filter.
* FileSystemWatcher.cs: added MangledFilter and finalizer.
* SearchPattern.cs: fixed the case when the pattern is "*".
svn path=/trunk/mcs/; revision=26978
* 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.
svn path=/trunk/mcs/; revision=22362
* System.dll.sources: added new files.
* System_test.dll.sources: added new test.
* System.IO/DefaultWatcher.cs: stub for the default watcher.
* System.IO/WindowsWatcher.cs: stub for the windows watcher.
* System.IO/FAMWatcher.cs: FAM watcher.
* System.IO/FileAction.cs: enum with event types.
* System.IO/FileSystemEventArgs.cs: added SetName property.
* System.IO/FileSystemWatcher.cs: added support for the 3 watchers.
* System.IO/IFileWatcher.cs: interface implemented by the watchers.
* System.IO/SearchPattern.cs: copied from corlib.
* Test/System.IO/FileSystemWatcherTest.cs: new test.
svn path=/trunk/mcs/; revision=22139
* FileSystemWatcher.cs: added attributes and some more implementation.
Now only the guts left to do.
* FileSystemEventArgs.cs:
* RenamedEventArgs.cs: implemented a couple of properties.
svn path=/trunk/mcs/; revision=12627