wifi-tally_Oostendam/nodemcu-firmware/lua_examples/myfile.lua

13 lines
234 B
Lua
Raw Normal View History

2021-09-27 19:52:27 +00:00
--myfile.lua
local myfile = {}
function myfile.print(name)
file.open(name)
repeat
local line=file.readline()
if line then line=(string.gsub(line,"\n","")) print(line) end
until not line
file.close()
end
return myfile