# LocalStorage

    public protocol LocalStorage : StorageInterface

The `LocalStorage` represents `StorageInterface`s that are backed by local files.

- `fileURL`

  The `NSURL` that points to the store file

  #### Declaration

  Swift

      var fileURL: URL { get }

- `migrationMappingProviders`

  An array of `SchemaMappingProvider`s that provide the complete mapping models for custom migrations.

  #### Declaration

  Swift

      var migrationMappingProviders: [SchemaMappingProvider] { get }

- `localStorageOptions`

  Options that tell the `DataStack` how to setup the persistent store

  #### Declaration

  Swift

      var localStorageOptions: LocalStorageOptions { get }

- `dictionary(forOptions:)`

  The options dictionary for the specified `LocalStorageOptions`

  #### Declaration

  Swift

      func dictionary(forOptions options: LocalStorageOptions) -> [AnyHashable : Any]?

- `cs_finalizeStorageAndWait(soureModelHint:)`

  Called by the `DataStack` to perform checkpoint operations on the storage. (SQLite stores for example, can convert the database’s WAL journaling mode to DELETE to force a checkpoint)

  #### Declaration

  Swift

      func cs_finalizeStorageAndWait(soureModelHint: NSManagedObjectModel) throws

- `cs_eraseStorageAndWait(metadata:soureModelHint:)`

  Called by the `DataStack` to perform actual deletion of the store file from disk. Do not call directly! The `sourceModel` argument is a hint for the existing store’s model version. Implementers can use the `sourceModel` to perform necessary store operations. (SQLite stores for example, can convert WAL journaling mode to DELETE before deleting)

  #### Declaration

  Swift

      func cs_eraseStorageAndWait(metadata: [String : Any], soureModelHint: NSManagedObjectModel?) throws