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
Post a Comment