Moves a persistent store to a new location, changing the storage type if necessary.
Original signature is '- (NSPersistentStore *)migratePersistentStore:(NSPersistentStore *)store toURL:(NSURL *)URL options:(NSDictionary *)options withType:(NSString *)storeType error:(NSError **)error'
Available in Mac OS X v10.4 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public virtual NSPersistentStore MigratePersistentStoreToURLOptionsWithTypeError( NSPersistentStore store, NSURL URL, NSDictionary options, NSString storeType, out NSError error )
Public Overridable Function MigratePersistentStoreToURLOptionsWithTypeError ( _ store As NSPersistentStore, _ URL As NSURL, _ options As NSDictionary, _ storeType As NSString, _ <OutAttribute> ByRef error As NSError _ ) As NSPersistentStore
public: virtual NSPersistentStore^ MigratePersistentStoreToURLOptionsWithTypeError( NSPersistentStore^ store, NSURL^ URL, NSDictionary^ options, NSString^ storeType, [OutAttribute] NSError^% error )
Parameters
- store (NSPersistentStore)
- A persistent store.
- URL (NSURL)
- An URL object that specifies the location for the new store.
- options (NSDictionary)
- A dictionary containing key-value pairs that specify whether the store should be read-only, and whether (for an XML store) the XML file should be validated against the DTD before it is read. For key definitions, see “Store Options.”
- storeType (NSString)
- A string constant (such as NSSQLiteStoreType) that specifies the type of the new store—see “Store Types.”
- error (NSError%)
- If an error occurs, upon return contains an instance of NSError that describes the problem.
Return Value
If the migration is successful, the new store, otherwise nil.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)