Convert NSURL to local file path

Viewed 65854

I have an NSURL that looks like this:

file://localhost/Users/myuser/myfile.txt

Is there a standard function to convert it to a local file path looking like this:

/Users/myuser/myfile.txt
2 Answers

Swift 4:

absoluteURL.path 

or

yourUrl.path
Related