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
varurl=URL(fileURLWithPath:"/whatever/test.swift")print("'\(url.path)'") // prints '/whatever/test.swift'
url.deleteLastPathComponent()print("'\(url.path)'") // prints '/whatever'
url.deleteLastPathComponent()print("'\(url.path)'") // prints ''
url =URL(fileURLWithPath:"/test.swift")print("'\(url.path)'") // prints '/test.swift'
url.deleteLastPathComponent()print("'\(url.path)'") // prints '/'
Where it prints '' at the end of the first section, I think it should print /.