downloadToFile

suspend fun Attachment.downloadToFile(path: String): Path

Given a String representing a file path, download the attachment to the file it points to.


suspend fun Attachment.downloadToFile(path: Path): Path

Given a Path object, download the attachment to the file it points to.


suspend fun Attachment.downloadToFile(file: File): Path

Given a File object, download the attachment and write it to the given file.