System provides a namespace for C and platform types and low-level system call wrappers, covering errno values, file descriptors, and paths. You use it to work directly with the underlying operating system from Swift, representing filesystem locations with FilePath and bridging C interoperability through the CInterop enumeration. The framework also exposes lower-level platform primitives such as the MachPortRight protocol. It is available on iOS, macOS, tvOS, watchOS, and visionOS.
File Paths 1
Represent and manipulate filesystem locations for low-level system calls.
- StFilePathiOS 14.0+Represents a location in the file system.
C Interoperability 1
Bridge Swift to the underlying C and platform types used by system call wrappers.
- EnCInteropiOS 15.0+A namespace for C and platform types
Platform Primitives 1
Lower-level operating-system primitives exposed for direct system programming.
- PrMachPortRightiOS 17.4+A protocol that represents a kind of right held on a Mach port for low-level platform interaction.
Structures 11
- StDeviceIDA Swift wrapper of the C `dev_t` type.
- StErrnoiOS 14.0+An error number used by system calls to communicate what kind of error
- StFileDescriptoriOS 14.0+An abstract handle to an input or output data resource,
- StFileFlagsFile-specific flags found in the `st_flags` property of a `stat` struct
- StFileModeA strongly-typed file mode representing a C `mode_t`.
- StFilePermissionsiOS 14.0+The access permissions for a file.
- StFileTypeA file type matching those contained in a C `mode_t`.
- StGroupIDA Swift wrapper of the C `gid_t` type.
- StInodeA Swift wrapper of the C `ino_t` type.
- StStatA Swift wrapper of the C `stat` struct.
- StUserIDA Swift wrapper of the C `uid_t` type.
Enumerations 1
- EnMachiOS 17.4+
Type Aliases 1
- TyCModeTThe C `mode_t` type.