22 Commits
Author SHA1 Message Date
Alexis Christoforides 532605f533 [System] Keep events from firing from a disposed 'DefaultWatcher' FileSystemWatcher
Fixes https://github.com/mono/mono/issues/8747

Also try to stop other implementations from dispatching events past Dispose(), without guaranteeing it
2019-07-15 23:25:32 +03:00
Mike Krüger 085ddcccb5 Fixes VS4Mac Issue #6898 (#12432)
https://github.com/mono/monodevelop/issues/6898

Not sure if it's the root of the problem but it surely fixes the dead lock on my machine.
2019-01-28 16:30:40 -05:00
Alexander Köplinger cb956b58a6 Revert "Revert "[System.IO] Integrate FileSystemWatchers from CoreFX The FSEvent CoreFX watcher becomes the new default for MacOS.""
This reverts commit 2174a521a3.
2018-02-28 13:42:15 +01:00
Marek Safar 2174a521a3 Revert "[System.IO] Integrate FileSystemWatchers from CoreFX The FSEvent CoreFX watcher becomes the new default for MacOS."
This reverts commit f5b10f34a9.
2018-02-28 12:46:53 +01:00
Alexis Christoforides f5b10f34a9 [System.IO] Integrate FileSystemWatchers from CoreFX
The FSEvent CoreFX watcher becomes the new default for MacOS.
2018-02-28 10:47:01 +01:00
Alexander Köplinger b3e3e4cc40 [System] Don't use DateTime.Now for measuring elapsed time
Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time
2017-07-02 23:31:34 +02:00
Andrés G. Aragoneses cfc5011ced [FileSystemWatcher] Kill race condition (fixes BXC#10205)
As seen in the stacktraces provided in [1],
a thread could modify the Files hashtable
while other thread is enumerating it, so this
can be prevented by using a lock{} in the parts
of the code that access and modify this field.

Patch licensed as MIT/X11.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=10205
2015-12-03 13:35:54 +08:00
Zoltan Varga 17edd267ab [bcl] Use List instead of ArrayList () in a few places. 2014-10-08 16:12:01 -04:00
Gonzalo Paniagua Javier 3a67a60098 2009-11-16 Gonzalo Paniagua Javier <[email protected]>
* 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.


svn path=/trunk/mcs/; revision=146290
2009-11-16 21:39:30 +00:00
Ben Maurer dd19011aa6 locking fixes
svn path=/trunk/mcs/; revision=45088
2005-05-26 23:18:18 +00:00
Lluis Sanchez 1f9b754376 2005-02-10 Lluis Sanchez Gual <[email protected]>
* DefaultWatcher.cs: Fix nullref exception when the object is disposed
	without any watcher.


svn path=/trunk/mcs/; revision=40383
2005-02-10 09:51:52 +00:00
Gonzalo Paniagua Javier fa2c6eb43c 2004-11-29 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: make it work when the FileMask does not have
	wildcards and we're watching a directory.


svn path=/trunk/mcs/; revision=36786
2004-11-29 19:03:29 +00:00
Ben Maurer e12984f828 2004-11-22 Ben Maurer <[email protected]>
* DefaultWatcher.cs: Copy the hashtable when we scan for changes
	so that you can make modifications in a handler. Fixes 65966.


svn path=/trunk/mcs/; revision=36403
2004-11-22 22:21:00 +00:00
Gonzalo Paniagua Javier c995669093 2004-10-07 Gonzalo Paniagua Javier <[email protected]>
* 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.

svn path=/trunk/mcs/; revision=34767
2004-10-07 00:44:12 +00:00
Gonzalo Paniagua Javier 0556ad0e07 2004-10-07 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: don't use Directory.GetFileSystemEntries when the
	pattern has no wildcards. Fixes bug #67447.

svn path=/trunk/mcs/; revision=34765
2004-10-07 00:29:30 +00:00
Gonzalo Paniagua Javier f04f14f3a7 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: fixed subdirectories notifications and don't
	fail when any directory is removed. Closes bug #59840.

svn path=/trunk/mcs/; revision=30313
2004-06-24 14:22:29 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Gonzalo Paniagua Javier fec76c733b 2004-05-09 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-05-09 03:31:54 +00:00
Gonzalo Paniagua Javier 5c450c3eec 2004-01-26 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: fixed condition for removal from the watches list.

svn path=/trunk/mcs/; revision=22513
2004-01-26 19:38:55 +00:00
Gonzalo Paniagua Javier 3e4be0adb1 2004-01-26 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: check if the FileSystemWatcher is in WaitForChange
	and call Monitor.PulseAll in that case.

svn path=/trunk/mcs/; revision=22497
2004-01-26 15:19:12 +00:00
Gonzalo Paniagua Javier 529f2815d7 2004-01-21 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-01-21 21:54:45 +00:00
Gonzalo Paniagua Javier dbea39aa46 2004-01-16 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-01-16 03:27:24 +00:00