diff --git a/examples/myfile.lua b/examples/myfile.lua new file mode 100644 index 00000000..0e0e7e0b --- /dev/null +++ b/examples/myfile.lua @@ -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