---
title: "makeIOHandle(url:compressionMethod:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makeiohandle(url:compressionmethod:)"
---

# makeIOHandle(url:compressionMethod:)

Creates an input/output file handle instance that represents a compressed file at a URL.

## Declaration

```swift
func makeIOHandle(url: URL, compressionMethod: MTLIOCompressionMethod) throws -> any MTLIOFileHandle
```

## Parameters

- `url`: A location URL to a compressed file in the file system.
- `compressionMethod`: The file’s compression format.

## Return Value

Return Value A new MTLIOFileHandle instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.

## Discussion

Discussion For information about using input/output command queues and file handles, see Resource loading.

## See Also

### Creating I/O file handles

- [makeIOFileHandle(url:)](metal/mtldevice/makeiofilehandle(url:).md)
- [makeIOFileHandle(url:compressionMethod:)](metal/mtldevice/makeiofilehandle(url:compressionmethod:).md)
- [makeIOHandle(url:)](metal/mtldevice/makeiohandle(url:).md)
