Contents

open(url:mode:)

Returns a configuration to use for opening a disk image.

Declaration

static func open(url: URL, mode: OpenConfiguration.Mode = .automatic) -> Self

Parameters

  • url:

    A Url of the disk image file to open.

  • mode:

    Mode in which to open the image (read-only or read-write).

Return Value

An OpenConfiguration instance.

Discussion

The following example demonstrates how to open a disk image.

let image = try DiskImage(opening: .open(url: imageURL))