# file2text proc

Source: https://ref.dm-lang.org/proc/file2text

### Format
> `file2text(File)`

### Args
> File: file to read

### Returns
> the contents of the file.

This can be useful when interacting with external applications that generate output in a text file. For example, you might have an external program that mimics conversation:

```dm /file2text/
mob/oracle/verb/tell(T as text)
  text2file(T,"talk.in")
  shell("talk < talk.in > talk.out")
  usr << file2text("talk.out")
```

### See also
- [shell proc](https://ref.dm-lang.org/proc/shell.md)
- [text2file proc](https://ref.dm-lang.org/proc/text2file.md)
