---
title: "asifLayer(url:type:)"
framework: diskimagekit
role: symbol
role_heading: Type Method
path: "diskimagekit/diskimage/creationconfiguration/asiflayer(url:type:)"
---

# asifLayer(url:type:)

Returns an Apple sparse image format (ASIF) configuration for stackable layers.

## Declaration

```swift
static func asifLayer(url: URL, type: DiskImage.LayerType) -> Self
```

## Parameters

- `url`: The doc://com.apple.documentation/documentation/Foundation/URL for the disk image file.
- `type`: The type of layer (cache or overlay).

## Return Value

Return Value An ASIFLayerCreationConfiguration instance for stacking use.

## Discussion

Discussion The following example demonstrates how to append a new cache layer to a base image: var stackedImage = try baseImage.appending(.asifLayer(url: cacheURL, type: .cache))
