---
name: "IO.readFile"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/IO.readFile"
---

# IO.readFile(3kaya)

Read a text file.

## NAME

IO::readFile - Read a text file.

## SYNOPSIS

**String readFile(** *String fname* **)**

## ARGUMENTS

**fname** A file name

## DESCRIPTION

Reads the entire contents of *fname* into a String. This function assumes that the file is a text file, rather than a binary file.

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**Binary.readBlock (3kaya)**

**IO.writeFile (3kaya)**
