创建文件夹
os.execute("md lxw")
--写文件
local file = io.open("lxw.txt","w")
file:write("happy")
file:close()
--读文件
local file = io.open("lxw.txt","r")
print(file:read('*line'))
file:close()
lua 创建文本,读取文本
最新推荐文章于 2024-08-31 12:21:03 发布
创建文件夹
os.execute("md lxw")
--写文件
local file = io.open("lxw.txt","w")
file:write("happy")
file:close()
--读文件
local file = io.open("lxw.txt","r")
print(file:read('*line'))
file:close()