Microsoft.Extensions.FileProviders.Physical 11.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 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.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/be0a4a7f4cf06cbd6ec714bd1d9afee6bdb040a8
998
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration. This package was built from the source code at https://github.com/aspnet/Extensions/tree/9bc79b2f25a3724376d7af19617c33749a30ea3a
755
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.
581
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
374
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.
366
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
74
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
55
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.
53
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
48
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
47
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
46
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
43
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
43
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
41
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
41
Umbraco.Cms.Core
Contains the core assembly needed to run Umbraco CMS.
40
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
39
Microsoft.VisualStudio.Web.BrowserLink
A middleware that supports creating a communication channel between the development environment and one or more web browsers. This package was built from the source code at https://github.com/aspnet/BrowserLink/tree/8cd3e0844d74975060a2bb1abb1e0a5ff943ce45
39

Version Downloads Last updated
11.0.0 1 11/17/2026
11.0.0-rc.3.26522.148 6 11/15/2026
11.0.0-rc.2.26504.105 12 10/14/2026
11.0.0-rc.1.26425.128 10 09/13/2026
11.0.0-preview.7.26381.103 13 08/12/2026
11.0.0-preview.6.26359.118 17 07/18/2026
11.0.0-preview.5.26302.115 16 06/20/2026
11.0.0-preview.4.26230.115 26 05/14/2026
11.0.0-preview.3.26207.106 14 06/22/2026
11.0.0-preview.2.26159.112 25 03/21/2026
11.0.0-preview.1.26104.118 37 03/09/2026
10.0.15 3 11/19/2026
10.0.14 7 11/01/2026
10.0.13 7 10/14/2026
10.0.12 8 09/14/2026
10.0.11 12 08/12/2026
10.0.10 12 07/16/2026
10.0.9 25 06/20/2026
10.0.8 15 05/15/2026
10.0.7 22 06/23/2026
10.0.6 11 06/23/2026
10.0.5 11 06/23/2026
10.0.4 22 03/21/2026
10.0.3 17 03/08/2026
10.0.2 13 03/08/2026
10.0.1 16 12/21/2025
10.0.0 30 11/24/2025
10.0.0-rc.2.25502.107 19 07/02/2026
10.0.0-rc.1.25451.107 22 09/21/2025
10.0.0-preview.7.25380.108 29 08/19/2025
10.0.0-preview.6.25358.103 23 07/23/2025
10.0.0-preview.5.25277.114 13 08/18/2025
10.0.0-preview.4.25258.110 20 06/20/2026
10.0.0-preview.3.25171.5 13 06/24/2026
10.0.0-preview.2.25163.2 17 03/26/2025
10.0.0-preview.1.25080.5 16 06/23/2026
9.0.23 4 11/17/2026
9.0.22 4 11/08/2026
9.0.21 10 10/14/2026
9.0.20 8 09/14/2026
9.0.19 6 08/12/2026
9.0.18 9 07/19/2026
9.0.17 10 06/28/2026
9.0.16 21 06/20/2026
9.0.15 14 07/01/2026
9.0.14 10 07/02/2026
9.0.13 25 06/25/2026
9.0.12 30 06/25/2026
9.0.11 14 06/23/2026
9.0.10 25 06/20/2026
9.0.9 11 06/20/2026
9.0.8 18 06/20/2026
9.0.7 16 06/23/2026
9.0.6 16 06/23/2026
9.0.5 34 06/23/2026
9.0.4 15 06/23/2026
9.0.3 16 03/26/2025
9.0.2 34 02/16/2025
9.0.1 23 02/16/2025
9.0.0 84 11/13/2024
9.0.0-rc.2.24473.5 18 11/08/2024
9.0.0-rc.1.24431.7 20 10/03/2024
9.0.0-preview.7.24405.7 11 08/29/2024
9.0.0-preview.6.24327.7 30 07/14/2024
9.0.0-preview.5.24306.7 33 06/29/2024
9.0.0-preview.4.24266.19 17 07/14/2024
9.0.0-preview.3.24172.9 14 06/24/2026
9.0.0-preview.2.24128.5 10 06/24/2026
9.0.0-preview.1.24080.9 17 06/23/2026
8.0.0 58 12/15/2023
8.0.0-rc.2.23479.6 13 10/09/2024
8.0.0-rc.1.23419.4 12 06/23/2026
8.0.0-preview.7.23375.6 25 10/07/2024
8.0.0-preview.6.23329.7 13 10/04/2024
8.0.0-preview.5.23280.8 14 08/12/2024
8.0.0-preview.4.23259.5 23 08/21/2024
8.0.0-preview.3.23174.8 15 10/11/2024
8.0.0-preview.2.23128.3 16 11/10/2025
8.0.0-preview.1.23110.8 24 09/07/2024
7.0.0 65 03/22/2023
7.0.0-rc.2.22472.3 24 10/04/2024
7.0.0-rc.1.22426.10 21 01/18/2024
7.0.0-preview.7.22375.6 16 01/06/2024
7.0.0-preview.6.22324.4 18 12/25/2023
7.0.0-preview.5.22301.12 27 06/07/2024
7.0.0-preview.4.22229.4 17 12/14/2024
7.0.0-preview.3.22175.4 31 06/24/2026
7.0.0-preview.2.22152.2 26 01/29/2024
7.0.0-preview.1.22076.8 28 01/18/2024
6.0.2-mauipre.1.22054.8 16 10/06/2024
6.0.1 14 06/20/2026
6.0.0 19 04/17/2022
6.0.0-rc.2.21480.5 17 12/26/2023
6.0.0-rc.1.21451.13 12 05/06/2024
6.0.0-preview.7.21377.19 26 02/29/2024
6.0.0-preview.6.21352.12 18 07/18/2024
6.0.0-preview.5.21301.5 30 01/17/2024
6.0.0-preview.4.21253.7 22 05/06/2024
6.0.0-preview.3.21201.4 18 08/29/2025
6.0.0-preview.2.21154.6 28 06/20/2026
6.0.0-preview.1.21102.12 18 10/09/2024
5.0.0 601 06/06/2021
5.0.0-rc.2.20475.5 24 06/20/2026
5.0.0-rc.1.20451.14 32 12/21/2023
5.0.0-preview.8.20407.11 23 11/18/2025
5.0.0-preview.7.20364.11 23 06/20/2026
5.0.0-preview.6.20305.6 17 04/25/2024
5.0.0-preview.5.20278.1 20 06/23/2026
5.0.0-preview.4.20251.6 28 02/04/2024
5.0.0-preview.3.20215.2 17 03/26/2024
5.0.0-preview.2.20160.3 17 12/23/2023
5.0.0-preview.1.20120.4 15 11/21/2024
3.1.32 13 10/06/2024
3.1.31 12 02/20/2024
3.1.30 14 12/14/2023
3.1.29 24 06/20/2026
3.1.28 26 06/20/2026
3.1.27 24 12/29/2023
3.1.26 17 10/06/2024
3.1.25 14 01/04/2025
3.1.24 16 02/10/2024
3.1.23 30 12/15/2023
3.1.22 21 09/13/2024
3.1.21 15 04/02/2024
3.1.20 15 06/23/2024
3.1.19 15 05/27/2025
3.1.18 29 03/15/2025
3.1.17 21 05/06/2024
3.1.16 21 04/02/2024
3.1.15 13 01/18/2024
3.1.14 20 12/16/2023
3.1.13 30 04/07/2024
3.1.12 34 02/24/2024
3.1.11 29 04/25/2024
3.1.10 20 01/01/2024
3.1.9 23 04/28/2021
3.1.8 30 12/21/2023
3.1.7 19 06/01/2024
3.1.6 17 01/04/2024
3.1.5 17 12/23/2023
3.1.4 21 12/06/2024
3.1.3 26 09/13/2024
3.1.2 25 10/12/2024
3.1.1 25 10/09/2024
3.1.0 25 07/10/2024
3.1.0-preview3.19553.2 11 05/02/2024
3.1.0-preview2.19525.4 20 10/12/2024
3.1.0-preview1.19506.1 21 07/13/2024
3.0.3 12 02/22/2025
3.0.2 22 06/20/2026
3.0.1 17 03/29/2024
3.0.0 13 12/16/2023
3.0.0-rc1.19456.10 12 07/27/2024
3.0.0-preview9.19423.4 19 06/14/2024
3.0.0-preview8.19405.4 16 10/05/2024
3.0.0-preview7.19362.4 16 06/22/2026
3.0.0-preview6.19304.6 33 12/04/2024
3.0.0-preview5.19227.9 28 03/10/2024
3.0.0-preview4.19216.2 28 01/21/2024
3.0.0-preview3.19153.1 17 10/08/2024
3.0.0-preview.19074.2 25 06/23/2026
3.0.0-preview.18572.1 21 05/05/2024
2.2.0 775 05/27/2021
2.2.0-preview3-35497 21 08/25/2024
2.2.0-preview2-35157 23 02/19/2024
2.2.0-preview1-35029 21 10/10/2024
2.1.1 19 09/03/2021
2.1.0 32 03/22/2021
2.1.0-rc1-final 10 03/30/2025
2.1.0-preview2-final 19 01/17/2024
2.1.0-preview1-final 30 12/20/2023
2.0.1 13 04/29/2025
2.0.0 24 12/21/2023
2.0.0-preview2-final 32 03/26/2024
2.0.0-preview1-final 24 12/26/2023
1.1.1 29 09/19/2024
1.1.0 24 06/23/2026
1.1.0-preview1-final 11 03/05/2025
1.0.1 23 09/07/2024
1.0.0 17 07/15/2024
1.0.0-rc2-final 20 12/12/2023