LocalFileContent

class LocalFileContent(path: Path, val contentType: ContentType = ContentType.defaultForFile(path)) : OutgoingContent.WriteChannelContent(source)

OutgoingContent implementation for serving local files.

Constructors

Link copied to clipboard
constructor(path: Path, contentType: ContentType = ContentType.defaultForFile(path))

Properties

Link copied to clipboard
open override val contentLength: Long
Link copied to clipboard
open override val contentType: ContentType
Link copied to clipboard
open val headers: Headers
Link copied to clipboard
open val status: HttpStatusCode?

Functions

Link copied to clipboard
open fun <T : Any> getProperty(key: AttributeKey<T>): T?
Link copied to clipboard
open fun <T : Any> setProperty(key: AttributeKey<T>, value: T?)
Link copied to clipboard
open fun trailers(): Headers?
Link copied to clipboard
open suspend override fun writeTo(channel: ByteWriteChannel)