---
title: "layer(url:type:)"
framework: diskimagekit
role: symbol
role_heading: Type Method
path: "diskimagekit/asifcreationconfiguration/layer(url:type:)"
---

# layer(url:type:)

Creates a configuration object for a new Apple sparse image format (ASIF) disk image layer.

## Declaration

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

## Parameters

- `url`: The doc://com.apple.documentation/documentation/Foundation/URL for a file that’s the backing store of the image.
- `type`: The doc://com.apple.diskimagekit/documentation/DiskImageKit/DiskImage/LayerType-swift.struct of the layer to create (a cache or overlay layer with an optional block count).

## Return Value

Return Value An ASIFLayerCreationConfiguration that you can use` for stacking operations.

## Discussion

Discussion Use this factory method to create a configuration that can be used with appending(_:). Use the configuration this method returns only for appending to stacked images, not for standalone image creation. For more information on ASIF layer creation for stacked images, see asifLayer(url:type:) .
