set

open operator fun set(path: String, stream: InputStream): S3Object

Creates or overwrites an object at the specified path with its contents uploaded from the given stream.

This method is a Kotlin syntax extra that is an alias for put.

Return

An S3Object instance handle on the target object.

See also

Parameters

path

Path to the new object to create.

stream

Stream whose contents will be written to the object in the store at the given path.

Throws

If this bucket or the bucket in which this object container resides no longer exists.

If an implementation specific exception is thrown. The implementation specific exception will be set to the thrown exception's 'cause' value.


open operator fun set(path: String, file: File): S3Object

Uploads the specified file to this container at the given path, overwriting any object presently at that path.

This method is a Kotlin syntax extra that is an alias for upload.

Return

An S3Object instance handle on the target object.

See also

Parameters

path

Path to the object to create/overwrite in this container.

file

Local file to upload.

Throws

If the given local file does not exist.

If the given local file handle points to a directory.

If this bucket or the bucket in which this object container resides no longer exists.

If an implementation specific exception is thrown. The implementation specific exception will be set to the thrown exception's 'cause' value.