<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="11.0.0-preview.2.26159.112" />

Microsoft.Extensions.FileProviders.PhysicalFileProvider

public class PhysicalFileProvider : IFileProvider, IDisposable
Looks up files using the on-disk file system.
public string Root { get; }

Gets the root directory for this instance.

public bool UseActivePolling { get; set; }

Gets or sets a value that determines if this instance of PhysicalFileProvider actively polls for file changes.

public bool UsePollingFileWatcher { get; set; }

Gets or sets a value that determines if this instance of PhysicalFileProvider uses polling to determine file changes.

public PhysicalFileProvider(string root)

Initializes a new instance of a PhysicalFileProvider at the given root directory.

public PhysicalFileProvider(string root, ExclusionFilters filters)

Initializes a new instance of a PhysicalFileProvider at the given root directory.

public void Dispose()

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

protected virtual void Dispose(bool disposing)

Disposes the provider.

public IDirectoryContents GetDirectoryContents(string subpath)

Enumerates a directory at the given path, if any.

public IFileInfo GetFileInfo(string subpath)

Locates a file at the given path by directly mapping path segments to physical directories.

public IChangeToken Watch(string filter)

Creates a IChangeToken for the specified filter.

Globbing patterns are interpreted by Matcher.