RosettaCodeData/Task/Write-entire-file/Pluto/write-entire-file.pluto
2026-04-30 12:34:36 -04:00

11 lines
246 B
Text

-- 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"))