download

abstract fun download(path: String, localFile: File): FileObject

Fetches the object at the target path and downloads it into the specified local file.

Return

An FileObject instance handle on the target object and local file.

Parameters

path

Path to the target object to download.

localFile

Target local file into which the object's content will be downloaded.

If this file does not exist it will be created as part of this operation.

If this file does already exist, it will be truncated before writing as part of this operation.

Throws

If the configured target object does not exist.

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.


abstract fun download(path: String, action: ObjectDownloadParams.() -> Unit): FileObject

Fetches the object at the configured path and downloads it into the target local file.

Return

An FileObject instance handle on the target object and local file.

Parameters

action

Action used to configure the backing S3 operation.

If this file does not exist it will be created as part of this operation.

If this file does already exist, it will be truncated before writing as part of this operation.

Throws

If the localFile value is not set on the configured parameters.

If the configured target object does not exist.

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.


abstract fun download(path: String, params: ObjectDownloadParams): FileObject

Fetches the object at the configured path and downloads it into the target local file.

Return

An FileObject instance handle on the target object and local file.

Parameters

params

Parameters for the backing S3 operation.

If this file does not exist it will be created as part of this operation.

If this file does already exist, it will be truncated before writing as part of this operation.

Throws

If the localFile value is not set on the configured parameters.

If the configured target object does not exist.

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.