ForNeVeR / ForNeVeR/TruePath

Specify behavior of `*Path::RelativeTo` for cases when it's impossible to build a relative path

Aperta
#40 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement good first issue help wanted
Lingua principale
C#
Stelle
104
Fork
15
Merge medio
9m
PR unite (30g)
2

Descrizione

On Unix file system, it's always possible to build a relative path between two paths. On Windows, however, it is not universally possible: say, between different disks or between a DOS device and a disk. The latter aspect often surprises people when they use `java.nio.file.Path::relativize` (that throws an exception), so we better do something else: either show the nature of the method in its type, or invent an alternate behavior.

Also, it is not possible between network shares.

We should decide and document the behavior of this method for these cases.

I am thinking about leaving a strict method that would return `null` for cases when it was unable to build a path, and a separate lax method like `RelativeToIfPossible` that would return `this` for such cases.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo l'API `*Path::RelativeTo` e la semantica dei percorsi esistente per Windows e Unix. Esamina il comportamento con dischi diversi, dispositivi DOS e condivisioni di rete, quindi documenta un contratto definito, incluso se il comportamento strict e quello di fallback debbano essere metodi separati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
operating-systems, tooling
Tipo di issue
Documentazione
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.