PhysicalFilesWatcher Class

Definition

Watches a physical file system for changes and triggers events on IChangeToken when files are created, change, renamed, or deleted.

C#
public class PhysicalFilesWatcher : IDisposable
Inheritance
PhysicalFilesWatcher
Implements

Constructors

PhysicalFilesWatcher(String, FileSystemWatcher, Boolean, ExclusionFilters)

Initializes an instance of PhysicalFilesWatcher that watches files in root. Wraps an instance of FileSystemWatcher.

PhysicalFilesWatcher(String, FileSystemWatcher, Boolean)

Initializes an instance of PhysicalFilesWatcher that watches files in root. Wraps an instance of FileSystemWatcher.

Methods

CreateFileChangeToken(String)

Creates an instance of IChangeToken for all files and directories that match the filter.

Dispose()

Disposes the provider. Change tokens may not trigger after the provider is disposed.

Dispose(Boolean)

Disposes the provider.

Applies to

产品 版本
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)