lua - Completely clearing a text file -


well, name self explanatory. don't know how go along , don't want risk breaking script deleting file , replacing it.

can post method use? tried searching around , far no luck.

posting egor skriptunoff's comment answer.

use

io.open(filename,"w"):close() 

where filename name of file want clear. open file writing , close file, discarding contents.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -