File:close() method
Closes the file previously opened for read/write operations. Any further read/write operations will fail.
Return value
This method returns no value.Example
local file = sys.File("Hello.txt")
-- open the file for writing, using default utf8 encoding
file:open("write")
file:write("Hello World")
file:close()