TechnologiesFoundation, System & Concurrency

System

iOSmacOStvOSwatchOSvisionOS

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.

  • St
    FilePathiOS 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.

  • En
    CInteropiOS 15.0+
    A namespace for C and platform types

Platform Primitives 1

Lower-level operating-system primitives exposed for direct system programming.

  • Pr
    MachPortRightiOS 17.4+
    A protocol that represents a kind of right held on a Mach port for low-level platform interaction.

Structures 11

  • St
    DeviceID
    A Swift wrapper of the C `dev_t` type.
  • St
    ErrnoiOS 14.0+
    An error number used by system calls to communicate what kind of error
  • St
    FileDescriptoriOS 14.0+
    An abstract handle to an input or output data resource,
  • St
    FileFlags
    File-specific flags found in the `st_flags` property of a `stat` struct
  • St
    FileMode
    A strongly-typed file mode representing a C `mode_t`.
  • St
    FilePermissionsiOS 14.0+
    The access permissions for a file.
  • St
    FileType
    A file type matching those contained in a C `mode_t`.
  • St
    GroupID
    A Swift wrapper of the C `gid_t` type.
  • St
    Inode
    A Swift wrapper of the C `ino_t` type.
  • St
    Stat
    A Swift wrapper of the C `stat` struct.
  • St
    UserID
    A Swift wrapper of the C `uid_t` type.

Enumerations 1

  • En
    MachiOS 17.4+

Type Aliases 1

  • Ty
    CModeT
    The C `mode_t` type.

Extends 1

String
← Foundation, System & Concurrency