You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .NET Framework does not support direct access to physical disks through paths that are device names, such as "\.\PHYSICALDRIVE0 ".
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?
The text was updated successfully, but these errors were encountered:
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.
The API reference for various constructors of
FileStream
contain these two paragraphs:The .NET Framework does not support direct access to physical disks through paths that are device names, such as "\.\PHYSICALDRIVE0 ".
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?
The text was updated successfully, but these errors were encountered: