I have generated a txt file from the billing system. My problem is, whenever the transaction is cancelled the newly written data in the txt file must be erase. Is there a function that erases the content of the txtfile generated from the system? I have tried getting the data from the txt file. It works but it wasnt erase in the txt file. pls help me on to solve on this. If you have an alternative solution or suggestion i will surely appreciate it. Thank you very much.
Note: The purpose why i need to delete the content of the generated file is because other system taking data in the generated txt file and prevent delay in reading the txt file.