Skip to content

Document that PhysicalFilesWatcher can watch paths that don't exist - #133013

Open
svick wants to merge 1 commit into
dotnet:mainfrom
svick:pfw-watch-nonexistent-docs
Open

Document that PhysicalFilesWatcher can watch paths that don't exist#133013
svick wants to merge 1 commit into
dotnet:mainfrom
svick:pfw-watch-nonexistent-docs

Conversation

@svick

@svick svick commented Sep 1, 2026

Copy link
Copy Markdown
Member

Also fixes formatting of PhysicalFilesProvider.Watch() parameter:

image

@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-extensions-filesystem
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 PhysicalFilesWatcher can watch a root directory that does not exist yet.
  • Clarify that Watch / CreateFileChangeToken patterns 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants