Document that PhysicalFilesWatcher can watch paths that don't exist - #133013
Open
svick wants to merge 1 commit into
Open
Document that PhysicalFilesWatcher can watch paths that don't exist#133013svick wants to merge 1 commit into
svick wants to merge 1 commit into
Conversation
svick
requested review from
mrek-msft and
rosebyte
and
a lite review from Copilot
September 1, 2026 13:18
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-extensions-filesystem |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
Updates XML documentation for Microsoft.Extensions.FileProviders.Physical to clarify that watchers/tokens can be created even when the target root path or watched entries don’t exist yet, and cleans up the Watch(string filter) parameter docs to render examples correctly.
Changes:
- Document that
PhysicalFilesWatchercan watch a root directory that does not exist yet. - Clarify that
Watch/CreateFileChangeTokenpatterns don’t require the target files/directories to exist at call time. - Improve XML doc formatting for
PhysicalFileProvider.Watch(string filter)examples.
File summaries
| File | Description |
|---|---|
| src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs | Expands XML docs to clarify non-existent root and non-existent watched entries are supported at token creation time. |
| src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs | Updates constructor and Watch parameter documentation to reflect non-existent roots/entries and improves example formatting. |
Review details
Suppressed comments (2)
src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFilesWatcher.cs:86
- XML doc comments in this library generally avoid contractions. Consider using "is not" here for consistency and to keep the API docs more formal.
/// <param name="root">The root directory for the watcher. The directory isn't required to exist.</param>
src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs:50
- XML doc comments in this library generally avoid contractions. Consider using "is not" here for consistency and to keep the API docs more formal.
/// <param name="root">The root directory. This should be an absolute path. The directory isn't required to exist.</param>
- Files reviewed: 2/2 changed files
- Comments generated: 4
- Review effort level: Lite
mrek-msft
approved these changes
Sep 1, 2026
rosebyte
approved these changes
Sep 1, 2026
This was referenced Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also fixes formatting of
PhysicalFilesProvider.Watch()parameter: