27 @property (readonly, copy) NSString*
name;
CBLDocument * document
The owning document.
Definition: CBLAttachment.h:24
NSString * contentType
The MIME type of the contents.
Definition: CBLAttachment.h:30
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
A revision of a CBLDocument.
Definition: CBLRevision.h:17
NSData * content
The data of the attachment.
Definition: CBLAttachment.h:49
BOOL contentAvailable
Is the content locally available? This may be NO if the attachment's document was pulled from a remot...
Definition: CBLAttachment.h:46
#define nullable
Definition: CBLBase.h:22
A CouchbaseLite document (as opposed to any specific revision of it.)
Definition: CBLDocument.h:16
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
CBLJSONDict * metadata
The Couchbase Lite metadata about the attachment, that lives in the document.
Definition: CBLAttachment.h:40
NSURL * contentURL
The (file:) URL of the file containing the contents.
Definition: CBLAttachment.h:62
An existing revision of a CBLDocument.
Definition: CBLRevision.h:80
nullable NSInputStream * openContentStream()
Returns a stream from which you can read the data of the attachment.
UInt64 length
The length in bytes of the contents.
Definition: CBLAttachment.h:33
NSString * name
The filename.
Definition: CBLAttachment.h:27
instancetype NS_UNAVAILABLE()
A binary attachment to a document revision.
Definition: CBLAttachment.h:18
UInt64 encodedLength
The length in bytes of the encoded form of the attachment.
Definition: CBLAttachment.h:37
CBLRevision * revision
The owning document revision.
Definition: CBLAttachment.h:21
BOOL purge()
Deletes the attachment's contents from local storage.