<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DiskImageKit",
  "identifier" : "/documentation/DiskImageKit/DiskImage/CreationConfiguration/raw(url:blockCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "DiskImageKit"
    ],
    "preciseIdentifier" : "s:12DiskImageKit0aB0C21CreationConfigurationPA2A011RAWCreationE0VRszrlE3raw3url10blockCountAG10Foundation3URLV_SitFZ"
  },
  "title" : "raw(url:blockCount:)"
}
-->

# raw(url:blockCount:)

Returns a RAW configuration for standalone or base images.

```
static func raw(url: URL, blockCount: Int) -> Self
```

## Parameters

`url`

The <doc://com.apple.documentation/documentation/Foundation/URL> for the disk image file.

`blockCount`

Size of the disk image in blocks.

## Return Value

A [`RAWCreationConfiguration`](/documentation/DiskImageKit/RAWCreationConfiguration) instance.

## Discussion

The framework only supports the 512-byte block size for RAW images.

The following example demonstrates how to create a RAW disk image.

```
_ = try DiskImage(creating: .raw(url: imageURL, blockCount: blockCount))
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)