I need url filepath be a URL (NSURL in old versions of Swift). I have this:
let paths = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDom
in swift 4 to convert to url use URL
let fileUrl = URL.init(fileURLWithPath: filePath)
or
let fileUrl = URL(fileURLWithPath: filePath)