How to Print the Contents of a File

In this tutorial you will learn how to print the contents of files.

Open a file
Printing the contents of a file is simple to do. To open a file you use the io.open function. Then with the file handle you call file:read with this argument "*a". This makes it read all text in the file.