DittoAttachment
public class DittoAttachment : Hashable
Represents an attachment and can be used to insert the associated attachment into a document at a specific key.
-
The attachment’s ID.
Declaration
Swift
public var id: String { get }
-
The attachment’s size given as number of bytes.
Declaration
Swift
public var len: Int { get }
-
The attachment’s metadata.
Declaration
Swift
public var metadata: [String : String] { get }
-
Declaration
Swift
public static func == (lhs: DittoAttachment, rhs: DittoAttachment) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Returns the attachment’s data.
Throws
Declaration
Swift
@available(*, deprecated, message: "Replaced by `DittoAttachment.data(﹚`.") public func getData() throws -> Data
Return Value
The attachment’s
Data
. -
Returns the attachment’s data.
Throws
Declaration
Swift
public func data() throws -> Data
Return Value
The attachment’s
Data
. -
Copies the attachment to the specified file path.
Throws
DittoSwiftError
.Declaration
Swift
public func copy(toPath path: String) throws