Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for FileStream constructors are confusing about accessing devices #1124

Open
Tracked by #64596
svick opened this issue Jul 9, 2017 · 2 comments
Open
Tracked by #64596
Labels
area-System.IO Pri3 Indicates issues/PRs that are low priority
Milestone

Comments

@svick
Copy link
Contributor

svick commented Jul 9, 2017

The API reference for various constructors of FileStream contain these two paragraphs:

  1. The .NET Framework does not support direct access to physical disks through paths that are device names, such as "\.\PHYSICALDRIVE0 ".

  2. Note
    path is not required to be a file stored on disk; it can be any part of a system that supports access through streams. For example, depending on the system, this class can access a physical device.

On first reading, I thought the two paragraphs are contradicting each other: the first says I can't access physical disks, the second says I can.

On second reading, I realized the paragraphs don't contradict each other: I can access physical devices, just not physical disks.

Is this interpretation correct?

In any case, I think this is confusing. Considering that I think device access is not a common requirement, should the two paragraphs just be deleted? If device access is actually possible this way, maybe it should be explained in a separate article?

@mairaw
Copy link
Contributor

mairaw commented Jul 10, 2017

@JeremyKuhne, @ianhays can you guys help with this one?

@JeremyKuhne
Copy link
Member

This one is a bit complicated. I discuss the various formats in one of my blog posts. We do allow device path syntax in .NET 4.6.2 and above as well as .NET Core.

I'm fine with deleting the snippets mentioned. It might be good to add an article about .NET path formats on Windows based on the above posts. I'm happy to help review such a change.

@BillWagner BillWagner transferred this issue from dotnet/docs Nov 20, 2018
@dotnet-bot dotnet-bot added untriaged New issue has not been triaged by the area owner and removed rerun-labels labels Nov 20, 2018
@PRMerger13 PRMerger13 added the Pri3 Indicates issues/PRs that are low priority label Nov 11, 2020
@jeffhandley jeffhandley added this to the Backlog milestone Aug 9, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

8 participants