dotnet / dotnet/dotnet-api-docs
Docs for FileStream constructors are confusing about accessing devices
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
[The API reference for various constructors of `FileStream`](https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.-ctor?view=netcore-2.0) 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?
Contributor guide
Assessment
This issue has not been assessed yet.