add a lua module example myfile.lua
This commit is contained in:
parent
2671c0c141
commit
8dbe8b67ce
|
@ -0,0 +1,12 @@
|
|||
--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
|
Loading…
Reference in New Issue