corda / net.corda.flows / FetchAttachmentsFlow

# FetchAttachmentsFlow

`class FetchAttachmentsFlow : FetchDataFlow<Attachment, ByteArray>`

Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

### Constructors

<init> | `FetchAttachmentsFlow(requests: Set<SecureHash>, otherSide: Party)` Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

### Inherited Properties

otherSide | `val otherSide: Party`
requests | `val requests: Set<SecureHash>`

### Functions

convert | `fun convert(wire: ByteArray): Attachment`
load | `fun load(txid: SecureHash): Attachment?`
maybeWriteToDisk | `fun maybeWriteToDisk(downloaded: List<Attachment>): Unit`

### Inherited Functions

call | `open fun call(): Result<T>` This is where you fill out your business logic. The returned object will usually be ignored, but can be helpful if this flow is meant to be used as a subflow.