File

class File(val path: Path) : TemplateSource.Content

Content read from a local file; fileName is the file's own name.

Constructors

Link copied to clipboard
constructor(path: Path)

Properties

Link copied to clipboard
open override val fileName: String

File name sent with the upload, when known.

Link copied to clipboard
val path: Path

Functions

Link copied to clipboard
open suspend override fun bytes(): ByteArray

Reads the content. Implementations read once and cache the result.

Link copied to clipboard
open suspend fun sha256(): TemplateId

Legacy template id: SHA-256 of the content, hex encoded.

Link copied to clipboard
open override fun toString(): String