Package straightway.odo.api.v0.cloud

Types

AccessException
Link copied to clipboard
class AccessException(reason: AccessException.Reason, message: String) : Exception
This message is thrown when cloud storage cannot be accessed.
Cloud
Link copied to clipboard
interface Cloud
Cloud storage functionality.
CloudReadAccess
Link copied to clipboard
interface CloudReadAccess
Provide read access to a cloud URI.
CloudReadWriteAccess
Link copied to clipboard
interface CloudReadWriteAccess : CloudReadAccess
Provide read and write access to a cloud URI.
NetworkException
Link copied to clipboard
class NetworkException(reason: NetworkException.Reason, message: String) : Exception
This message is thrown when network problems occurred while accessing cloud storage.

Functions

read
Link copied to clipboard
suspend fun CloudReadAccess.read(vararg path: String): ByteArray?
Read binary data from the given path, relative to the uri.
readString
Link copied to clipboard
suspend fun CloudReadAccess.readString(vararg path: String): String?
Read an UTF8 string from the given path, relative to the uri.
suspend fun CloudReadAccess.readString(path: List<String>): String?
Read an UTF8 string from the given path, relative to the uri.
write
Link copied to clipboard
suspend fun CloudReadWriteAccess.write(content: ByteArray, vararg path: String)
Write binary data to a cloud file with the given path.
writeString
Link copied to clipboard
suspend fun CloudReadWriteAccess.writeString(content: String, vararg path: String)
Write an UTF8 string to a cloud file with the given path.
suspend fun CloudReadWriteAccess.writeString(content: String, path: List<String>)
Write an UTF8 string to a cloud file with the given path.