PrivMX DOCS
API Reference/PrivMX Endpoint Swift Extra/Inboxes

FileDataSource

Fields

privateMeta

Data Declared private (to be encrypted) metadata of the File

publicMeta

Data Declared public metadata of the File

size

Int64 Declared size of the File

hasDataLeft

Bool Signifies that there are still bytes that have not been retrieved

Methods

getNextChunk(ofSize:)

Retrieves up to chunkSizebytes from the data source.

Params

chunkSize

Int64

the size of a chunk to retrieve from the source

mutating func getNextChunk(
ofSize chunkSize:Int64
) throws -> Data

Returns

Data · next chunkSize bytes from the source

close()

Attempts to close the data source. Calling this method makes sense if the source is a file on disc.

mutating func close(
) throws

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.