Skip to content

Add few changes to path changes with .NET 8 and Windows 11 #42370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/standard/io/file-path-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The type of the path determines whether or not a current directory is applied in

If the path is a legacy DOS device such as `CON`, `COM1`, or `LPT1`, it is converted into a device path by prepending `\\.\` and returned.

A path that begins with a legacy device name is always interpreted as a legacy device by the <xref:System.IO.Path.GetFullPath(System.String)?displayProperty=nameWithType> method. For example, the DOS device path for `CON.TXT` is `\\.\CON`, and the DOS device path for `COM1.TXT\file1.txt` is `\\.\COM1`.
Prior to Windows 11, a path that begins with a legacy device name is always interpreted as a legacy device by the <xref:System.IO.Path.GetFullPath(System.String)?displayProperty=nameWithType> method. For example, the DOS device path for `CON.TXT` is `\\.\CON`, and the DOS device path for `COM1.TXT\file1.txt` is `\\.\COM1`. Because this no longer applies with Windows 11, specify the full path to the legacy DOS device, such as `\\.\CON`.

### Apply the current directory

Expand All @@ -152,6 +152,9 @@ If the path starts with something other than a separator, the current drive and

All forward slashes (`/`) are converted into the standard Windows separator, the back slash (`\`). If they are present, a series of slashes that follow the first two slashes are collapsed into a single slash.

> [!NOTE]
> Starting with .NET 8 on Unix-based operating systems, the runtime no longer converts back slash (`\`) characters to directory separators (forward slashes `/`). For more information, see [Backslash mapping in Unix file paths](../../core/compatibility/core-libraries/8.0/file-path-backslash.md).

### Evaluate relative components

As the path is processed, any components or segments that are composed of a single or a double period (`.` or `..`) are evaluated:
Expand Down
Loading