-- Create a text file. io.contents("hello.txt", "hello") -- Check it worked. print(io.contents("hello.txt")) -- Overwrite it by 'creating' the file again. io.contents("hello.txt", "goodbye") -- Check it worked. print(io.contents("hello.txt"))