Microsoft.Extensions.FileProviders.Physical 8.0.0
About
Provides an implementation of a physical file provider, facilitating file access and monitoring on the disk. The primary type, PhysicalFileProvider, enables the lookup of files on disk and can watch for changes either via FileSystemWatcher or polling mechanisms.
Key Features
- Easy access and monitoring of files on the disk.
- Ability to watch for file changes either by using
FileSystemWatcheror through polling.
How to Use
This library can be used to look up files on disk and monitor file changes effectively.
Below is an example of how to use the PhysicalFileProvider to access files on disk and monitor changes:
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.FileProviders.Physical;
using var provider = new PhysicalFileProvider(AppContext.BaseDirectory);
Environment.SetEnvironmentVariable("DOTNET_USE_POLLING_FILE_WATCHER", "1");
var contents = provider.GetDirectoryContents(string.Empty);
foreach (PhysicalFileInfo fileInfo in contents)
{
Console.WriteLine(fileInfo.PhysicalPath);
}
var changeToken = provider.Watch("*.txt");
changeToken.RegisterChangeCallback(_ => Console.WriteLine("Text file changed"), null);
Console.ReadLine();
Main Types
The main types provided by this library are:
Microsoft.Extensions.FileProviders.PhysicalFileProviderMicrosoft.Extensions.FileProviders.PhysicalDirectoryInfoMicrosoft.Extensions.FileProviders.PhysicalFileInfo
Additional Documentation
Related Packages
- Abstractions of files and directories: Microsoft.Extensions.FileProviders.Abstractions
- File system globbing to find files matching a specified pattern: Microsoft.Extensions.FileSystemGlobbing
Feedback & Contributing
Microsoft.Extensions.FileProviders.Physical is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.Extensions.FileProviders.Physical.
| Packages | Downloads |
|---|---|
|
Microsoft.Extensions.Configuration.UserSecrets
User secrets configuration provider implementation for Microsoft.Extensions.Configuration. User secrets mechanism enables you to override application configuration settings with values stored in the local secrets file. You can use UserSecretsConfigurationExtensions.AddUserSecrets extension method on IConfigurationBuilder to add user secrets provider to the configuration builder.
|
17 |
|
SixLabors.ImageSharp.Web
ImageSharp Middleware for serving images via a url based API.
|
17 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/dc5e11abdb05b322f4b74b3afbcfb352fe984b2e
|
16 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/704f7cb1d2cea33afb00c2097731216f121c2c73
|
16 |
|
RazorLight
Use Razor to build your templates from strings / files / EmbeddedResources outside of ASP.NET MVC for .NET Core
|
16 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
15 |
|
SixLabors.ImageSharp.Web
ImageSharp Middleware for serving images via a url based API.
|
15 |
|
RazorLight
Use Razor to build your templates from strings / files / EmbeddedResources outside of ASP.NET MVC for .NET Core
|
15 |
|
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
|
15 |
|
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
|
15 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/009e1ccafde4086ea52999e878f6e7aa5a7c4ccf
|
15 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/e3187077455f953200e3c930430808a30f48b82e
|
15 |
|
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
|
14 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
|
14 |
|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
14 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d62be99ba6e73feb46d7b64a6b4ce8610dc9040a
|
14 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/827b96040e62e5aa47d829bfa61c000d315d4f2e
|
14 |
|
Microsoft.AspNetCore.SpaServices.Extensions
Helpers for building single-page applications on ASP.NET MVC Core.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/fedc545ce86467b7d3413d906f1ab02fb3db12ff
|
14 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Extensions.FileProviders.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
.NET Standard 2.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 8.0.0)
.NET 8.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 8.0.0)
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
.NET 7.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 8.0.0)
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
.NET 6.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
- Microsoft.Extensions.FileProviders.Abstractions (>= 8.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 9.0.2 | 15 | 02/18/2025 |
| 9.0.1 | 13 | 02/18/2025 |
| 9.0.0 | 13 | 02/18/2025 |
| 8.0.0 | 14 | 01/22/2024 |
| 7.0.0 | 13 | 02/18/2025 |
| 6.0.1 | 13 | 02/18/2025 |
| 6.0.0 | 15 | 06/15/2023 |
| 5.0.0 | 13 | 02/18/2025 |
| 3.1.32 | 13 | 02/18/2025 |
| 3.1.31 | 12 | 02/18/2025 |
| 3.1.30 | 13 | 02/18/2025 |
| 3.1.29 | 14 | 02/18/2025 |
| 3.1.28 | 14 | 02/18/2025 |
| 3.1.27 | 13 | 02/18/2025 |
| 3.1.26 | 13 | 02/18/2025 |
| 3.1.25 | 13 | 02/18/2025 |
| 3.1.24 | 13 | 02/18/2025 |
| 3.1.23 | 13 | 02/18/2025 |
| 3.1.22 | 13 | 02/18/2025 |
| 3.1.21 | 13 | 02/18/2025 |
| 3.1.20 | 13 | 02/18/2025 |
| 3.1.19 | 14 | 02/18/2025 |
| 3.1.18 | 12 | 02/18/2025 |
| 3.1.17 | 13 | 02/18/2025 |
| 3.1.16 | 13 | 02/18/2025 |
| 3.1.15 | 14 | 02/18/2025 |
| 3.1.14 | 13 | 02/18/2025 |
| 3.1.13 | 15 | 02/18/2025 |
| 3.1.12 | 13 | 02/18/2025 |
| 3.1.11 | 13 | 02/18/2025 |
| 3.1.10 | 13 | 02/18/2025 |
| 3.1.9 | 14 | 02/18/2025 |
| 3.1.8 | 13 | 02/18/2025 |
| 3.1.7 | 13 | 02/18/2025 |
| 3.1.6 | 14 | 02/18/2025 |
| 3.1.5 | 13 | 02/18/2025 |
| 3.1.4 | 13 | 02/18/2025 |
| 3.1.3 | 13 | 02/18/2025 |
| 3.1.2 | 13 | 02/18/2025 |
| 3.1.1 | 14 | 02/18/2025 |
| 3.1.0 | 13 | 02/18/2025 |
| 3.0.3 | 13 | 02/18/2025 |
| 3.0.2 | 15 | 02/18/2025 |
| 3.0.1 | 13 | 02/18/2025 |
| 3.0.0 | 15 | 02/18/2025 |
| 2.2.0 | 13 | 02/18/2025 |
| 2.1.1 | 18 | 06/19/2023 |
| 2.1.0 | 13 | 02/18/2025 |
| 2.1.0-rc1-final | 13 | 02/18/2025 |
| 2.1.0-preview2-final | 13 | 02/18/2025 |
| 2.1.0-preview1-final | 13 | 02/18/2025 |
| 2.0.1 | 13 | 02/18/2025 |
| 2.0.0 | 13 | 06/16/2023 |
| 2.0.0-preview2-final | 14 | 02/18/2025 |
| 1.1.1 | 13 | 02/18/2025 |
| 1.1.0 | 13 | 02/18/2025 |
| 1.1.0-preview1-final | 13 | 02/18/2025 |
| 1.0.1 | 13 | 02/18/2025 |
| 1.0.0 | 14 | 01/22/2024 |
| 1.0.0-rc2-final | 13 | 02/18/2025 |