Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PhysicalFileProvider Class

Definition

Namespace:
Microsoft.Extensions.FileProviders
Assembly:
Microsoft.Extensions.FileProviders.Physical.dll
Package:
Microsoft.Extensions.FileProviders.Physical v11.0.0-preview.5.26302.115
Source:
PhysicalFileProvider.cs
Source:
PhysicalFileProvider.cs
Source:
PhysicalFileProvider.cs
Source:
PhysicalFileProvider.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Looks up files using the on-disk file system.

public ref class PhysicalFileProvider : IDisposable, Microsoft::Extensions::FileProviders::IFileProvider
public class PhysicalFileProvider : IDisposable, Microsoft.Extensions.FileProviders.IFileProvider
type PhysicalFileProvider = class
 interface IFileProvider
 interface IDisposable
Public Class PhysicalFileProvider
Implements IDisposable, IFileProvider
Inheritance
PhysicalFileProvider
Implements

Remarks

When the environment variable "DOTNET_USE_POLLING_FILE_WATCHER" is set to "1" or "true", calls to Watch(String) will use PollingFileChangeToken.

Constructors

Name Description
PhysicalFileProvider(String, ExclusionFilters)

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

PhysicalFileProvider(String)

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

Properties

Name Description
Root

Gets the root directory for this instance.

UseActivePolling

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

UsePollingFileWatcher

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

Methods

Name Description
Dispose()

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

Dispose(Boolean)

Disposes the provider.

GetDirectoryContents(String)

Enumerates a directory at the given path, if any.

GetFileInfo(String)

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

Watch(String)

Creates a IChangeToken for the specified filter.

Globbing patterns are interpreted by Matcher.

Applies to


Feedback

Was this page helpful?