I have a program that reads in CVS data and writes it to a core data persistent store. I would like to change the location of the persistent store. Per Apple docs it appears that I should be able to achieve this by overriding it in a sub class of NSPersistentContainer. Unfortunately I have been unable to figure how to do this. Below is my attempt. The Xcode error I get is "cannot call value of non-function type URL".
final class CoreDataContainer: NSPersistentContainer {
let storePathURL: URL = URL(string: "file:///Users/Chris/Developer/Persistent Store")!
override class func defaultDirectoryURL() -> URL {
return super.defaultDirectoryURL()
.absoluteURL(storePathURL)
}
}