What are the intended semantics of the various path‐related methods of
URL? Which methods are supposed to use a URL path separator (i.e.
/), and which are supposed to use the platform path separator (i.e.
\ on Windows)?
I ask because the behaviour of
URL(fileURLWithPath: x).path == x changed between Swift 5.2 and Swift 5.3, where
x is a Windows path containing
\. Originally it returned
true, but now it returns
false, because the left side ends up with
/ instead. None of the documentation specifies what it is supposed to do, so I’m wondering whether the change was a bug or a bug fix.