I'm currently writing a program which writes some test to a text file, at the moment, everytime it'd run it just appends the output to the previous output. Insead of doing this I need to clear the old output, and replace it with my own.
How could I go about clearing the contents of the text file?