SKData

public final class SKData

SKData holds an immutable data buffer. Not only is the data immutable, but the actual ptr that is returned (by data)) is guaranteed to always be the same for the life of this instance.

  • Undocumented

    Declaration

    Swift

    public init(size: Int = 0)
  • Undocumented

    Declaration

    Swift

    public init(data: [UInt8])
  • Creates a new Data with the contents of the specified file

    Declaration

    Swift

    public static func fromFile(file: String) -> SKData?

    Parameters

    file

    the file to load

    Return Value

    if the file is present, a new SKData with the contents of the file, or nil on failure

  • Returns the number of bytes stored.

    Declaration

    Swift

    public var size: Int { get }
  • Undocumented

    Declaration

    Swift

    public var isEmpty: Bool { get }
  • Returns the ptr to the data.

    Declaration

    Swift

    public var data: UnsafeRawPointer! { get }