dotnet / dotnet/dotnet-api-docs
Docs for FileStream constructors are confusing about accessing devices
- Lingua principale
- C#
- Stelle
- 950
- Fork
- 1.7k
- Merge medio
- 2g 19h
- PR unite (30g)
- 52
Descrizione
[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?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando il riferimento API collegato per il costruttore FileStream e confronta i due paragrafi citati. Verifica se la distinzione tra dispositivi fisici e dischi fisici è accurata, quindi rivedi o rimuovi le indicazioni fuorvianti affinché la documentazione contenga una spiegazione priva di ambiguità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100