Microsoft.Extensions.FileProviders.Physical 9.0.0-rc.2.24473.5

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 FileSystemWatcher or 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.PhysicalFileProvider
  • Microsoft.Extensions.FileProviders.PhysicalDirectoryInfo
  • Microsoft.Extensions.FileProviders.PhysicalFileInfo

Additional Documentation

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.AspNetCore.All
Microsoft.AspNetCore.All
51
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
57
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
50
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
54
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
61
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download. This package was built from the source at: https://github.com/aspnet/Universe/tree/1016eae4004686f7fdad13f5c329f63bbae1f3a1
57
Microsoft.AspNetCore.Diagnostics
ASP.NET Core middleware for exception handling, exception display pages, and diagnostics information. Includes developer exception page middleware, exception handler middleware, runtime info middleware, status code page middleware, and welcome page middleware
54
Microsoft.AspNetCore.Diagnostics
ASP.NET Core middleware for exception handling, exception display pages, and diagnostics information. Includes developer exception page middleware, exception handler middleware, runtime info middleware, status code page middleware, and welcome page middleware This package was built from the source at: https://github.com/aspnet/Diagnostics/tree/983d7836ab27bce47a86e5425860e8ac1ff2b858
56
Microsoft.AspNetCore.Diagnostics
ASP.NET Core middleware for exception handling, exception display pages, and diagnostics information. Includes developer exception page middleware, exception handler middleware, runtime info middleware, status code page middleware, and welcome page middleware This package was built from the source code at https://github.com/aspnet/Diagnostics/tree/c802d5ef5fba1ba8dfbcb8c3741af2ba15e9d1aa
69
Microsoft.AspNetCore.Mvc.Razor.Host
ASP.NET Core MVC design time hosting infrastructure for the Razor view engine.
69
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
51
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
58
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
60
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
63
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
2,003
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
10,012
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration. When using NuGet 3.x this package requires at least version 3.4.
1,814
Microsoft.Extensions.Configuration.UserSecrets
User secrets configuration provider implementation for Microsoft.Extensions.Configuration.
50
Microsoft.Extensions.Configuration.UserSecrets
User secrets configuration provider implementation for Microsoft.Extensions.Configuration.
52
Microsoft.Extensions.Configuration.UserSecrets
User secrets configuration provider implementation for Microsoft.Extensions.Configuration. When using NuGet 3.x this package requires at least version 3.4.
60

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET Standard 2.0

.NET 9.0

.NET 8.0

Version Downloads Last updated
9.0.0-rc.2.24473.5 5 10/08/2024
9.0.0-rc.1.24431.7 10 09/12/2024
9.0.0-preview.7.24405.7 12 08/15/2024
9.0.0-preview.6.24327.7 12 07/11/2024
9.0.0-preview.5.24306.7 8 06/13/2024
9.0.0-preview.4.24266.19 7 05/25/2024
9.0.0-preview.3.24172.9 8 04/21/2024
9.0.0-preview.2.24128.5 8 03/15/2024
9.0.0-preview.1.24080.9 12 02/20/2024
8.0.0 13 11/16/2023
8.0.0-rc.2.23479.6 17 10/19/2023
8.0.0-rc.1.23419.4 17 09/17/2023
8.0.0-preview.7.23375.6 21 09/10/2023
8.0.0-preview.6.23329.7 18 09/10/2023
8.0.0-preview.5.23280.8 8 06/21/2023
8.0.0-preview.4.23259.5 17 05/28/2023
8.0.0-preview.3.23174.8 20 06/21/2023
8.0.0-preview.2.23128.3 21 04/02/2023
8.0.0-preview.1.23110.8 10 04/02/2023
7.0.0 41 12/03/2022
7.0.0-rc.2.22472.3 35 10/15/2022
7.0.0-rc.1.22426.10 20 09/22/2022
7.0.0-preview.7.22375.6 38 09/23/2022
7.0.0-preview.6.22324.4 19 09/23/2022
7.0.0-preview.5.22301.12 21 09/23/2022
7.0.0-preview.4.22229.4 21 09/22/2022
7.0.0-preview.3.22175.4 25 09/25/2022
7.0.0-preview.2.22152.2 60 09/24/2022
7.0.0-preview.1.22076.8 21 09/24/2022
6.0.2-mauipre.1.22102.15 22 09/23/2022
6.0.2-mauipre.1.22054.8 26 09/23/2022
6.0.0 12 09/27/2022
6.0.0-rc.2.21480.5 67 09/25/2022
6.0.0-rc.1.21451.13 17 09/21/2022
6.0.0-preview.7.21377.19 22 09/23/2022
6.0.0-preview.6.21352.12 17 09/24/2022
6.0.0-preview.5.21301.5 15 09/23/2022
6.0.0-preview.4.21253.7 20 09/26/2022
6.0.0-preview.3.21201.4 53 09/26/2022
6.0.0-preview.2.21154.6 21 09/25/2022
6.0.0-preview.1.21102.12 15 09/25/2022
5.0.0 1,782 06/27/2022
5.0.0-rc.2.20475.5 18 09/23/2022
5.0.0-rc.1.20451.14 30 09/23/2022
5.0.0-preview.8.20407.11 20 09/25/2022
5.0.0-preview.7.20364.11 20 09/24/2022
5.0.0-preview.6.20305.6 25 09/24/2022
5.0.0-preview.5.20278.1 18 09/26/2022
5.0.0-preview.4.20251.6 19 09/25/2022
5.0.0-preview.3.20215.2 58 09/27/2022
5.0.0-preview.2.20160.3 51 09/26/2022
5.0.0-preview.1.20120.4 25 09/23/2022
3.1.32 15 01/13/2023
3.1.31 10 01/13/2023
3.1.30 15 10/18/2022
3.1.29 15 09/23/2022
3.1.28 16 09/21/2022
3.1.27 17 09/26/2022
3.1.26 48 09/22/2022
3.1.25 25 09/25/2022
3.1.24 16 09/23/2022
3.1.23 12 09/21/2022
3.1.22 15 09/23/2022
3.1.21 17 09/22/2022
3.1.20 13 09/23/2022
3.1.19 17 09/22/2022
3.1.18 17 09/24/2022
3.1.17 56 09/24/2022
3.1.16 19 09/21/2022
3.1.15 11 09/24/2022
3.1.14 34 09/23/2022
3.1.13 18 09/25/2022
3.1.12 16 09/23/2022
3.1.11 21 09/24/2022
3.1.10 49 09/25/2022
3.1.9 34 09/23/2022
3.1.8 19 09/21/2022
3.1.7 15 09/25/2022
3.1.6 17 09/23/2022
3.1.5 10,023 06/27/2022
3.1.4 15 10/18/2022
3.1.3 15 09/24/2022
3.1.2 15 09/22/2022
3.1.1 15 09/24/2022
3.1.0 1,997 06/27/2022
3.1.0-preview3.19553.2 14 10/18/2022
3.1.0-preview2.19525.4 10 09/24/2022
3.1.0-preview1.19506.1 58 09/26/2022
3.0.3 12 09/27/2022
3.0.2 15 09/24/2022
3.0.1 19 09/23/2022
3.0.0 12 09/23/2022
3.0.0-rc1.19456.10 19 09/25/2022
3.0.0-preview9.19423.4 23 09/24/2022
3.0.0-preview8.19405.4 60 09/25/2022
3.0.0-preview7.19362.4 35 09/23/2022
3.0.0-preview6.19304.6 20 09/22/2022
3.0.0-preview5.19227.9 11 09/25/2022
3.0.0-preview4.19216.2 18 09/24/2022
3.0.0-preview3.19153.1 21 09/23/2022
3.0.0-preview.19074.2 61 09/23/2022
3.0.0-preview.18572.1 25 09/25/2022
2.2.0 10 10/18/2022
2.2.0-preview3-35497 16 09/25/2022
2.2.0-preview2-35157 16 09/23/2022
2.2.0-preview1-35029 18 09/24/2022
2.1.1 16 09/21/2022
2.1.0 14 06/27/2022
2.1.0-rc1-final 39 09/21/2022
2.1.0-preview2-final 16 09/24/2022
2.1.0-preview1-final 20 09/26/2022
2.0.1 68 09/23/2022
2.0.0 16 09/25/2022
2.0.0-preview2-final 17 09/25/2022
2.0.0-preview1-final 67 09/21/2022
1.1.1 12 09/26/2022
1.1.0 13 10/15/2022
1.1.0-preview1-final 20 09/21/2022
1.0.1 48 09/21/2022
1.0.0 16 09/26/2022
1.0.0-rc2-final 19 09/23/2022