So I have converted an NSURL to a String. So if I println it looks like file:///Users/... etc.
NSURL
String
println
file:///Users/...
Later I want this
In Swift 4 and Swift 3, To convert String to URL:
URL(string: String)
or,
URL.init(string: "yourURLString")
And to convert URL to String:
URL.absoluteString
The one below converts the 'contents' of the url to string
String(contentsOf: URL)