CoreDataController
public class CoreDataController
Holds the NSPersistentContainer for accessing core data entities of the ErxTask
module
-
Initialize a CoreDataController
Throws
CoreDataController.Error
when initialization failsDeclaration
Swift
public required init( url: URL, excludeFromBackup: Bool = true, fileProtection level: FileProtectionType, fileManager: FileManager = FileManager.default ) throws
Parameters
url
the database location
excludeFromBackup
true, the database file(s) is/are excluded from backup
level
the File protection level
fileManager
FileManager for the file operations (Default: FileManager.default)
-
Destroy a persistent store.
Throws
If the store cannot be destroyed.Declaration
Swift
public func destroyPersistentStore(at storeURL: URL) throws
Parameters
storeURL
A
URL
for the persistent store to be destroyed. -
Declaration
Swift
public enum Error : Swift.Error, LocalizedError, Equatable