ForNeVeR / ForNeVeR/TruePath

Improve case-sensitive path comparison

Offen
#20 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement help wanted
Vorherrschende Sprache
C#
Sterne
104
Forks
15
Ø Merge
9 Min.
Gemergte PRs (30 T.)
2

Beschreibung

I suggest the following changes.
1. Introduce three different path comparator kinds.
- [x] Textual only. This one should operate on strict string equality, and named accordingly (something like `StrictStringPathComparer`?).
- [x] Platform-default comparer: should implement case-sensitive comparison on Linux, and case-insensitive (probably with corresponding relaxations related to Unicode normalization) on Windows and macOS.
- [ ] File-system-aware comparer: for each compared path component, should compare the actual case sensitivity of the corresponding file system subroot. For non-existent paths, it should use the platform-dependent policy of calculating the case sensitivity for new subdirectories (is it normally taken from the parent directory?).

This one is obviously IO-intensive, so I'm thinking of introducing some sort of "sensitivity cache" that'd store the lists of checked paths and subtrees in a trie data structure, and would be used for one or multiple operations (probably one per comparer instance, with the ability of manual reset).
2. Allow the paths to use different comparers; platform-default being used by default, as one giving the best precision while not losing performance dur to intensive IO.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Es werden keine Dateien oder Tests genannt. Beginnen Sie damit, die bestehende Implementierung des Pfadvergleichs und ihre öffentliche API zu finden, und verfolgen Sie anschließend, wie Plattformstandards ausgewählt werden. Das Issue ist abgeschlossen, wenn Richtlinien für textuellen, plattformstandardmäßigen und dateisystembewussten Vergleich definiert sind und Aufrufer einen Comparer auswählen können, wobei das Verhalten des Plattformstandards erhalten bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
operating-systems
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.