You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import System
extensionURL{varfileSystemRepresentation:String{FilePath(self)!.string }}
It's unclear which, if either of these, actually does the right thing on a platform like Windows, where the .path property of a URL is not in native format. Both are far too indirect.
The text was updated successfully, but these errors were encountered:
IMO the first one is the one to prefer. The second one is going to re-parse the path string, whereas the first one only will do the URL representation conversion.
Thanks Saleem. To be 100% clear for Foundation maintainers, Saleem's answer does not solve the issue I'm reporting, which is about a missing API and documentation. It's especially concerning that the correct answer today has to involve the word "unsafe".
I know of two options that seem likely to do the right thing across platforms:
It's unclear which, if either of these, actually does the right thing on a platform like Windows, where the
.path
property of aURL
is not in native format. Both are far too indirect.The text was updated successfully, but these errors were encountered: