<!--
{
  "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

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

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

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

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

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

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

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

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



---

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)