<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/CInterop",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System8CInteropO"
  },
  "title" : "CInterop"
}
-->

# CInterop

A namespace for C and platform types

```
enum CInterop
```

## Topics

### Type Aliases

[`typealias Char`](/documentation/System/CInterop/Char)

The C `char` type

[`typealias DeviceID`](/documentation/System/CInterop/DeviceID)

[`typealias FileFlags`](/documentation/System/CInterop/FileFlags)

[`typealias GroupID`](/documentation/System/CInterop/GroupID)

[`typealias Inode`](/documentation/System/CInterop/Inode)

[`typealias Mode`](/documentation/System/CInterop/Mode)

[`typealias PlatformChar`](/documentation/System/CInterop/PlatformChar)

The platform’s preferred character type. On Unix, this is an 8-bit C
`char` (which may be signed or unsigned, depending on platform). On
Windows, this is `UInt16` (a “wide” character).

[`typealias PlatformUnicodeEncoding`](/documentation/System/CInterop/PlatformUnicodeEncoding)

The platform’s preferred Unicode encoding. On Unix this is UTF-8 and on
Windows it is UTF-16. Native strings may contain invalid Unicode,
which will be handled by either error-correction or failing, depending
on API.

[`typealias Stat`](/documentation/System/CInterop/Stat)

The C `stat` struct.

[`typealias UserID`](/documentation/System/CInterop/UserID)

### Type Methods

[`static func stat(UnsafePointer<CChar>, inout CInterop.Stat) -> Int32`](/documentation/System/CInterop/stat(_:_:))

Calls the C `stat()` function.

---

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)