Skip to content

Commit 2f76300

Browse files
authored
add notes (#42370)
1 parent 501284a commit 2f76300

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/standard/io/file-path-formats.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The type of the path determines whether or not a current directory is applied in
133133

134134
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.
135135

136-
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`.
136+
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`.
137137

138138
### Apply the current directory
139139

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

153153
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.
154154

155+
> [!NOTE]
156+
> 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).
157+
155158
### Evaluate relative components
156159

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

0 commit comments

Comments
 (0)