method
Backend.Put
Atomically and durably write an object with its declared size.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
key | string | The key value. |
source | io.Reader | The source value. |
size | int64 | The size value. |
_ | string | The _ value. |
Returns
The declared result.
result errorHow it works
The local backend does not persist contentType. It rejects traversal/path-shaped object keys and size mismatches, and preserves an existing object when a replacement fails.
Full signature
Related types
BackendA filesystem implementation of storage.Backend.