LocalFileContent

class LocalFileContent(file: File, contentType: ContentType) : OutgoingContent.ReadChannelContent

OutgoingContent representing a local file with a specified contentType, expires date and caching

Parameters

file

specifies the File to be served to a client

Constructors

Link copied to clipboard
fun LocalFileContent(file: File, contentType: ContentType = ContentType.defaultForFile(file))

Functions

Link copied to clipboard
open fun <T : Any> getProperty(key: AttributeKey<T>): T?
Link copied to clipboard
open override fun readFrom(): ByteReadChannel
open override fun readFrom(range: LongRange): ByteReadChannel
Link copied to clipboard
open fun <T : Any> setProperty(key: AttributeKey<T>, value: T?)

Properties

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