addContentsOfFile method

void addContentsOfFile(
  1. NSString filePath, {
  2. ObjCBlock<Void Function(NSURL, NSArray?, NSError?)>? withCompletionHandler,
})

Adds the offline packs located at the given file path to offline storage.

The file must be a valid offline pack database bundled with the application or downloaded separately.

The resulting packs are added or updated to the shared offline storage object’s packs property, then the completion block is executed.

@param filePath A string representation of the file path. The file path must be writable as schema updates may be perfomed. @param completion The completion handler to call once the contents of the given file has been added to offline storage. This handler is executed asynchronously on the main queue.

Implementation

void addContentsOfFile(objc.NSString filePath, {objc.ObjCBlock<ffi.Void Function(objc.NSURL, objc.NSArray?, objc.NSError?)>? withCompletionHandler}) {
_objc_msgSend_o762yo(this.ref.pointer, _sel_addContentsOfFile_withCompletionHandler_, filePath.ref.pointer, withCompletionHandler?.ref.pointer ?? ffi.nullptr);

}