---
title: "file"
sidebar_label: "file"
description: "Kotlin binding reference: file."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[ServerResponse](../index.md)/[Companion](index.md)/[file](file.md)

# file

[common]\
fun [file](file.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [ServerResponse](../index.md)

Serve a file, its type inferred from the extension (contain [path](file.md) before deriving it from request input).