Contents

asif(url:blockCount:blockSize:)

Returns an Apple sparse image format (ASIF) configuration for standalone or base images.

Declaration

static func asif(url: URL, blockCount: Int, blockSize: DiskImage.BlockSize) -> Self

Parameters

  • url:

    The Url for the disk image file.

  • blockCount:

    Size of the disk image in blocks.

  • blockSize:

    The Blocksize Swift.enum to use.

Return Value

An ASIFCreationConfiguration instance for standalone use.

Discussion

Use this initializer when creating a standalone image, or a base image for a stack, using init(creating:). To create a cache or overlay layer for a stacked disk image, use asifLayer(url:type:) instead.

The following example demonstrates how to create a ASIF disk image:

_ = try DiskImage(creating: .asif(url: imageURL, blockCount: blockCount, blockSize: .bytes512))