Luart
Comprehensive Windows framework to develop in Lua
modules > sys > File > close

File : close ( ) method

Closes the file previously opened for read/write operations. Any further read/write operations will not work.

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