Lua教程-I/O文件操作

Lua語言也跟其他語言一樣提供了對文件的操作,來看看Lua提供了那些對文件進行操作方法。 文件操作方法 操作方法 說明 io.open (filename [, mode]) 按照指定的mode打開一個文件 io.close ([file]) 關閉文件,若無參數,關閉默認輸出文件 io.flush () 把緩衝區的數據寫入到文件中 io.input ([file]) 打開文件(文本模式) io.l
相關文章
相關標籤/搜索