IOError

public struct IOError : Swift.Error

An Error for an IO operation.

  • Undocumented

    See more

    Declaration

    Swift

    public enum FailureDescription
  • The errno that was set for the operation.

    Declaration

    Swift

    public let errnoCode: Int32
  • The actual reason (in an human-readable form) for this IOError.

    Declaration

    Swift

    public let reason: FailureDescription
  • Creates a new IOError`

    Note

    At the moment, this constructor is more expensive than IOError(errnoCode:function:) as the String will incur reference counting

    Declaration

    Swift

    public init(errnoCode: Int32, reason: String)

    Parameters

    errorCode

    the errno that was set for the operation.

    reason

    the actual reason (in an human-readable form).

  • Creates a new IOError`

    Note

    This constructor is the cheapest way to create an IOError.

    Declaration

    Swift

    public init(errnoCode: Int32, function: StaticString)

    Parameters

    errorCode

    the errno that was set for the operation.

    function

    The function the error happened in, the human readable description will be generated automatically when needed.