Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Nessuno ha ancora preso questa issue.

Valutazione

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

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.

Descrizione

enhancement good first issue help wanted

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.

Lingua principale
C#
Stelle
104
Fork
19
Merge medio
13h 42m
PR unite (30g)
9

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ForNeVeR/TruePath

Tutte le issue di ForNeVeR/TruePath

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.