Rollup merge of #138832 - ChrisDenton:with_native_path, r=joboet

Start using `with_native_path` in `std::sys::fs`

Ideally, each platform should use their own native path type internally. This will, for example, allow passing a `CStr` directly to `std::fs::File::open` and therefore avoid the need for allocating a new null-terminated C string.

However, doing that for every function and platform all at once makes for a large PR that is way too prone to breaking. So this PR does some minimal refactoring which should help progress towards that goal. The changes are Unix-only and even then I avoided functions that require more changes so that this PR is just moving things around.

r? joboet
This commit is contained in:
Matthias Krüger 2025-03-29 21:08:12 +01:00 committed by GitHub
commit 2fe1dcd3ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available