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

# makeIOHandle(url:)

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

## Declaration

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

## Parameters

- `url`: The URL to a resource file in the file system.

## 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:compressionMethod:)](metal/mtldevice/makeiohandle(url:compressionmethod:).md)
