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

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

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[Tokenizer](../index.md)/[Companion](index.md)/[fromFile](fromFile.md)

# fromFile

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

Load any supported tokenizer artifact, detecting its format: a directory is probed for its artifact, a file is read by its name or its content. A path no format claims fails naming every format tried.