PhysicalFileProvider Class
Definition
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
PhysicalFileProvider(String, ExclusionFilters) |
Initializes a new instance of a PhysicalFileProvider at the given root directory. |
PhysicalFileProvider(String) |
Initializes a new instance of a PhysicalFileProvider at the given root directory. |
Properties
Root |
The root directory for this instance. |
UseActivePolling |
Gets or sets a value that determines if this instance of PhysicalFileProvider actively polls for file changes.
When This property is only effective when UsePollingFileWatcher is set. |
UsePollingFileWatcher |
Gets or sets a value that determines if this instance of PhysicalFileProvider uses polling to determine file changes. By default, PhysicalFileProvider uses FileSystemWatcher to listen to file change events for Watch(String). FileSystemWatcher is ineffective in some scenarios such as mounted drives. Polling is required to effectively watch for file changes. |
Methods
Dispose() |
Disposes the provider. Change tokens may not trigger after the provider is disposed. |
Dispose(Boolean) |
Disposes the provider. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetDirectoryContents(String) |
Enumerate a directory at the given path, if any. |
GetFileInfo(String) |
Locate a file at the given path by directly mapping path segments to physical directories. |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Watch(String) |
Creates a IChangeToken for the specified Globbing patterns are interpreted by Matcher. |