System.IO APIs throw exceptions for invalid paths only when used, not when normalizing
See https://docs.microsoft.com/en-us/archive/blogs/jeremykuhne/system-io-in-net-core-2-1-sneak-peek
See dotnet/runtime#38487 (comment)
I'll let a product team member writes this in a more organized way.
Version introduced
.NET Core 2.1
Old behavior
System.IO APIs used to throw exceptions for invalid paths when normalizing a path.
New behavior
System.IO APIs are no longer throwing exceptions when normalizing a path. They only throw exceptions when using the path.
Reason for change
Leaving this to the product team to write.
Recommended action
Leaving this to the product team to write.
Category
Affected APIs
I don't have a complete list of the affected APIs.
Note
The API reference (for example, for FileInfo ctor) is outdated. It states that it will throw an exception for invalid paths.
Issue metadata
- Issue type: breaking-change
System.IO APIs throw exceptions for invalid paths only when used, not when normalizing
See https://docs.microsoft.com/en-us/archive/blogs/jeremykuhne/system-io-in-net-core-2-1-sneak-peek
See dotnet/runtime#38487 (comment)
I'll let a product team member writes this in a more organized way.
Version introduced
.NET Core 2.1
Old behavior
System.IO APIs used to throw exceptions for invalid paths when normalizing a path.
New behavior
System.IO APIs are no longer throwing exceptions when normalizing a path. They only throw exceptions when using the path.
Reason for change
Leaving this to the product team to write.
Recommended action
Leaving this to the product team to write.
Category
Affected APIs
I don't have a complete list of the affected APIs.
Note
The API reference (for example, for FileInfo ctor) is outdated. It states that it will throw an exception for invalid paths.
Issue metadata