dotnet / dotnet/dotnet-api-docs

[Feature] .NET Core 2.1 System.IO API changes

Offen
#1,685 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
:checkered_flag: Release: .NET Core 2.x area-System.IO doc-update Pri1 Pri3
Vorherrschende Sprache
C#
Sterne
950
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

# .NET Core 2.1 System.IO API changes

There are a number of behavior changes to System.IO APIs in .NET Core 2.1 and new APIs. This issue summarizes the high level changes and links to relevant documents.

*Still Needed:*
- [ ] Content Types
- [ ] Table of Contents
- [x] Prioritization

# General

APIs have been modified to better support cross platform code writing and substantially improve performance. Here is a summary of the API changes:

1. Path validation has been simplified
2. Span overloads have been added for a number of `System.IO.Path` APIs
3. There is a new overload for `Path.GetFullPath()` that allows specifying a base path for resolving the path
4. Directory enumeration results are more consistent cross-plat
5. New enumeration options have been added
6. A new extensible enumeration API has been added

Initial details are below. I'll be adding more links and details shortly.

## Path Validation

To facilitate writing cross platform code, System.IO.Path APIs have had their preemptive error checking simplified. Notably:

- `Path.GetFullPath()` only checks for embedded nulls, null strings, and empty strings
- No IO APIs check for invalid characters
- `Path.GetDirectoryName()` returns null for empty strings, instead of throwing
- Search patterns are no longer validated beyond null check and rooting (they cannot return true from `Path.IsPathRooted()`)

## Span overloads

https://github.com/dotnet/corefx/issues/25539

## Path.GetFullPath overload

https://github.com/dotnet/corefx/issues/25539

## Enumeration API changes

https://github.com/dotnet/corefx/issues/25873

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit der Durchsicht der Dokumentation zur System.IO API und der verknüpften corefx-Issues 25539 und 25873 zu den Änderungen an Span, GetFullPath und der Enumeration. Vervollständigen Sie die fehlenden Abschnitte „Content Types“ und „Table of Contents“ und überprüfen Sie anschließend, dass die Zusammenfassung das aufgeführte Verhalten und die API-Änderungen von .NET Core 2.1 abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
32/100

Neue Issues direkt in Ihr Postfach

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