Files

class Files

Functions

Link copied to clipboard
suspend fun delete(name: String, config: DeleteFileConfig? = null): DeleteFileResponse

Deletes a remotely stored file.

Link copied to clipboard
suspend fun download(file: File, config: DownloadFileConfig? = null): ByteReadChannel
suspend fun download(fileName: String, config: DownloadFileConfig? = null): ByteReadChannel

Downloads a file from the API.

Link copied to clipboard
suspend fun Files.downloadToFile(file: File, outputPath: <Error class: unknown class>, config: DownloadFileConfig? = null)
suspend fun Files.downloadToFile(fileName: String, outputPath: <Error class: unknown class>, config: DownloadFileConfig? = null)

Downloads a file from the API and streams it directly to a local file path.

Link copied to clipboard
suspend fun get(name: String, config: GetFileConfig? = null): File

Retrieves the file information from the service.

Link copied to clipboard
fun list(config: ListFilesConfig? = null): Pager<File>

Makes an API request to list files.

Link copied to clipboard
suspend fun upload(byteArray: ByteArray, config: UploadFileConfig? = null): File
suspend fun upload(channel: ByteReadChannel, size: Long, config: UploadFileConfig? = null): File

Uploads a file to the API.

Link copied to clipboard
suspend fun Files.upload(path: <Error class: unknown class>, config: UploadFileConfig? = null): File

Uploads a file at the specified path to the API.

suspend fun Files.upload(file: <Error class: unknown class>, config: UploadFileConfig? = null): File

Uploads a file to the API.