5 instantiations of FileSystemWatcher
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (1)
37var rootWatcher = _sharedRootWatchers.GetOrCreate<object?>(rootPath, static (key, _) => new FileSystemWatcher(key), arg: null);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
177watcher = UsePollingFileWatcher && UseActivePolling ? null : new FileSystemWatcher(root);
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
58_watcher = new FileSystemWatcher(directory, file);
Microsoft.VisualStudio.LanguageServices (1)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
72_vsFeedbackSemaphoreFileWatcher = new FileSystemWatcher(vsFeedbackTempDir, VSFeedbackSemaphoreFileName);
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
112dirMon.Fsw = new FileSystemWatcher(dir);
58 references to FileSystemWatcher
Microsoft.CodeAnalysis.LanguageServer (12)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (7)
13/// An implementation of <see cref="IFileChangeWatcher" /> that is built atop the framework <see cref="FileSystemWatcher" />. This is used if we can't 17/// This implementation creates one <see cref="FileSystemWatcher"/> per root drive and uses filtering to route file 30private readonly ReferenceCountedDisposableCache<string, FileSystemWatcher> _sharedRootWatchers = new(s_pathStringComparer); 35private IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>> GetOrCreateSharedWatcher(string rootPath) 43private static void AttachWatcher(IEventRaiser eventRaiser, IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>> watcher) 51private static void DetachAndDisposeWatcher(IEventRaiser eventRaiser, IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>> watcher) 68=> ReferenceCountedDisposableCache<string, FileSystemWatcher>.TestAccessor.GetCacheKeys(watcher._sharedRootWatchers);
HostWorkspace\FileWatching\DefaultFileChangeWatcher.FileChangeContext.cs (5)
26private readonly ImmutableArray<IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>>> _fileSystemWatchersForWatchedDirectories; 34var fileSystemWatchersForWatchedDirectoriesBuilder = ImmutableArray.CreateBuilder<IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>>>(); 106private readonly IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>> _watcher; 109public IndividualWatchedFile(FileChangeContext context, string filePath, IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>> watcher) 142public static ImmutableArray<IReferenceCountedDisposable<ICacheEntry<string, FileSystemWatcher>>> GetRootFileWatchers(FileChangeContext context)
Microsoft.Extensions.FileProviders.Physical (10)
PhysicalFileProvider.cs (3)
82/// By default, <see cref="PhysicalFileProvider"/> uses <see cref="FileSystemWatcher"/> to listen to file change events 83/// for <see cref="Watch(string)"/>. <see cref="FileSystemWatcher"/> is ineffective in some scenarios such as mounted drives. 164FileSystemWatcher? watcher;
PhysicalFilesWatcher.cs (7)
32private readonly FileSystemWatcher? _fileWatcher; 45/// Wraps an instance of <see cref="System.IO.FileSystemWatcher" />. 55FileSystemWatcher? fileSystemWatcher, 63/// Wraps an instance of <see cref="System.IO.FileSystemWatcher" />. 74FileSystemWatcher? fileSystemWatcher, 90throw new PlatformNotSupportedException(SR.Format(SR.FileSystemWatcher_PlatformNotSupported, typeof(FileSystemWatcher))); 124/// <see cref="PhysicalFilesWatcher(string, FileSystemWatcher, bool)" />. Globbing patterns
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
20private FileSystemWatcher _watcher;
Microsoft.VisualStudio.LanguageServices (1)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
40private readonly FileSystemWatcher? _vsFeedbackSemaphoreFileWatcher;
netstandard (1)
netstandard.cs (1)
927[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileSystemWatcher))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
565[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileSystemWatcher))]
System.IO.FileSystem.Watcher (31)
System\IO\ErrorEventArgs.cs (1)
7/// Provides data for the <see cref='System.IO.FileSystemWatcher.Error'/> event.
System\IO\ErrorEventHandler.cs (2)
8/// handle the <see cref='System.IO.FileSystemWatcher.Error'/> 9/// event of a <see cref='System.IO.FileSystemWatcher'/>.
System\IO\FileSystemEventArgs.cs (3)
7/// Provides data for the directory events: <see cref='System.IO.FileSystemWatcher.Changed'/>, <see cref='System.IO.FileSystemWatcher.Created'/>, <see cref='System.IO.FileSystemWatcher.Deleted'/>.
System\IO\FileSystemEventHandler.cs (4)
7/// Represents the method that will handle the <see cref='System.IO.FileSystemWatcher.Changed'/>, 8/// <see cref='System.IO.FileSystemWatcher.Created'/>, or 9/// <see cref='System.IO.FileSystemWatcher.Deleted'/> event of 10/// a <see cref='System.IO.FileSystemWatcher'/> class.
System\IO\FileSystemWatcher.cs (12)
74/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class. 82/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class, 92/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class, 255/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is changed. 270/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is created. 285/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is deleted. 315/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> 463/// Raises the <see cref='System.IO.FileSystemWatcher.Changed'/> event. 471/// Raises the <see cref='System.IO.FileSystemWatcher.Created'/> event. 479/// Raises the <see cref='System.IO.FileSystemWatcher.Deleted'/> event. 499/// Raises the <see cref='System.IO.FileSystemWatcher.Error'/> event. 515/// Raises the <see cref='System.IO.FileSystemWatcher.Renamed'/> event.
System\IO\FileSystemWatcher.Linux.cs (6)
993private readonly WeakReference<FileSystemWatcher> _weakFsw; 1018public Watcher(FileSystemWatcher fsw) 1020_weakFsw = new WeakReference<FileSystemWatcher>(fsw); 1127FileSystemWatcher? fsw = Fsw; 1230private FileSystemWatcher? Fsw 1234_weakFsw.TryGetTarget(out FileSystemWatcher? watcher);
System\IO\RenamedEventArgs.cs (1)
7/// Provides data for the <see cref='System.IO.FileSystemWatcher.Renamed'/> event.
System\IO\RenamedEventHandler.cs (2)
7/// Represents the method that will handle the <see cref='System.IO.FileSystemWatcher.Renamed'/> event of a <see cref='System.IO.FileSystemWatcher'/> class.
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
27internal FileSystemWatcher Fsw;