 
 public class CorePersistence {
     private let stack: CoreStack!
+    
+    public var sqliteFilePath: URL? {
+        return stack.databaseFilePath
+    }
+    
     public lazy var mainContext: NSManagedObjectContext = {
         let context = self.stack.mainContext!
         context.name = "Main"

        return false
    }
    
    private func databaseFilePath() -> URL? {
        if let existing = pathToSQLiteFile {
            return existing
        } else if self.storeType == NSSQLiteStoreType {


private protocol CoreStack {
    var mainContext: NSManagedObjectContext! { get }
    var databaseFilePath: URL? { get }
    func performUsingWorker(closure: ((NSManagedObjectContext) -> ()))
}

@available(iOS 10, *)
@available(tvOS 10.0, *)
private class CoreDataStack: CoreStack {
    fileprivate var databaseFilePath: URL?
    private let modelName: String!
    private lazy var container: NSPersistentContainer = {
        let container = NSPersistentContainer(name: self.modelName)
