<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLIOError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLIOError"
  },
  "title" : "MTLIOError.Code"
}
-->

# MTLIOError.Code

The error codes for creating an input/output file handle.

```
enum Code
```

## Topics

### Error codes

[`MTLIOErrorURLInvalid`](/documentation/Metal/MTLIOError-swift.struct/Code/urlInvalid)

An error code that represents a problem with a file URL.

[`MTLIOErrorInternal`](/documentation/Metal/MTLIOError-swift.struct/Code/internal)

An error code that represents a problem internal to the Metal framework.

[`MTLIOErrorURLInvalid`](/documentation/Metal/MTLIOError-swift.struct/Code/urlInvalid)

An error code that represents a problem with a file URL.

[`MTLIOErrorInternal`](/documentation/Metal/MTLIOError-swift.struct/Code/internal)

An error code that represents a problem internal to the Metal framework.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)