                 try FileManager.default.createDirectory(atPath: directoryPath, withIntermediateDirectories: true)
             }
         }
-
+        
         //
         let persistentStoreDescription = NSPersistentStoreDescription(url: persistentStoreURL)
         


// MARK: -

open class PersistentContainer<Context: NSManagedObjectContext> {
    
    // MARK: -
    
    fileprivate let rawValue: NSPersistentContainer
    fileprivate let enableUbiquity: Bool

    // MARK: -
    
    public init(bundle: Bundle = Bundle.main, storageType: StorageType = .disk, name: String? = nil, managedObjectModel: NSManagedObjectModel? = nil, managedObjectModelURL: URL? = nil, persistentStoreURL: URL? = nil, ubiquitousContainerIdentifier: String? = nil, ubiquitousContentRelativePath: String? = nil, ubiquitousContentName: String? = nil) throws {
        //
        guard let name = name ?? bundle.bundleIdentifier else {
            throw Error.invalidName
        }
        
        guard let managedObjectModelURL = managedObjectModelURL ?? bundle.managedObjectModelURL(forManagedObjectModelName: name) else {
            throw Error.invalidManagedObjectModelURL
        }
        
        guard let managedObjectModel = managedObjectModel ?? NSManagedObjectModel(contentsOf: managedObjectModelURL) ?? NSManagedObjectModel.mergedModel(from: [bundle]) else {
            throw Error.managedObjectModelNotFound
        }

        guard let persistentStoreURL = persistentStoreURL ?? bundle.persistentStoreURL(forManagedObjectModelName: name, applicationName: name) else {
            throw Error.invalidPersistentStoreURL
        }
        
        //
        self.rawValue = HelperPersistentContainer(name: name, managedObjectModel: managedObjectModel)
        self.enableUbiquity = (ubiquitousContainerIdentifier != nil)
        
        //
        if storageType == .disk {

    
}


// MARK: -

public enum StorageType {
    case disk
    case memory
}

// MARK: -

public enum PersistentContainerError: Swift.Error {
    case invalidName
    case invalidManagedObjectModelURL
    case managedObjectModelNotFound
    case invalidPersistentStoreURL
}


// MARK: -

