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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -