Open
Description
print(URL(fileURLWithPath: #"C:\Users\alex"#).path)
print(URL(fileURLWithPath: #"C:/Users/alex"#).path)
Both print statements above print C:/Users/alex
. I think they should print C:\Users\alex
.
Maybe worth noting: Using withUnsafeFileSystemRepresentation
returns backslashes. Should that be exposed through URL.path
?
URL(fileURLWithPath: #"C:/Users/alex"#).withUnsafeFileSystemRepresentation {
print(String(cString: $0!))
}
// prints C:\Users\alex