Class UmbracoPluginPhysicalFileProvider
Looks up files using the on-disk file system and check file extensions are on a allow list
Inheritance
Namespace: Umbraco.Cms.Web.Common.Plugins
Assembly: Umbraco.Web.Common.dll
Syntax
public class UmbracoPluginPhysicalFileProvider : PhysicalFileProvider, IDisposable, IFileProvider
Remarks
When the environment variable "DOTNET_USE_POLLING_FILE_WATCHER" is set to "1" or "true", calls to Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(System.String) will use Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken.
Constructors
View SourceUmbracoPluginPhysicalFileProvider(String, IOptionsMonitor<UmbracoPluginSettings>, ExclusionFilters)
Initializes a new instance of the UmbracoPluginPhysicalFileProvider class, at the given root directory.
Declaration
public UmbracoPluginPhysicalFileProvider(string root, IOptionsMonitor<UmbracoPluginSettings> options, ExclusionFilters filters = ExclusionFilters.Sensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | root | The root directory. This should be an absolute path. |
Microsoft.Extensions.Options.IOptionsMonitor<UmbracoPluginSettings> | options | The configuration options. |
Microsoft.Extensions.FileProviders.Physical.ExclusionFilters | filters | Specifies which files or directories are excluded. |
Methods
View SourceGetFileInfo(String)
Locate a file at the given path by directly mapping path segments to physical directories.
Declaration
public IFileInfo GetFileInfo(string subpath)
Parameters
Type | Name | Description |
---|---|---|
System.String | subpath | A path under the root directory |
Returns
Type | Description |
---|---|
Microsoft.Extensions.FileProviders.IFileInfo | The file information. Caller must check Microsoft.Extensions.FileProviders.IFileInfo.Exists property. |
Remarks
The path needs to pass the Microsoft.Extensions.FileProviders.Physical.ExclusionFilters and the