Contents

load(from:completionHandler:)

Load a restore image from a file on the local file system.

Declaration

@preconcurrency class func load(from fileURL: URL, completionHandler: @escaping  @Sendable (Result<VZMacOSRestoreImage, any Error>) -> Void)

Parameters

  • fileURL:

    A file URL that indicates the macOS restore image to load.

  • completionHandler:

    A block called after the restore image successfully loaded or has failed to load. The error parameter passed to the block is nil if the restore image loads successfully.

    The system invokes the completion handler on an arbitrary thread.

Discussion

VZMacOSRestoreImage can load macOS installation media from a local file. If the fileURL parameter doesn’t refer to a local file, the system raises an exception.

See Also

Controlling the Restoration Process