Closed
Description
In #7131 it becomes useful to have access to a raw buffer which is the platform's representation of the path for passing to system APIs. I propose a with_platform_buffer() method which returns the appropriate raw buffer. On Windows this would be UTF-16, elsewhere it'd just be bytes.
This could avoid doing allocations in lowlevel APIs which directly pass paths to the system.