I have a datafile, datalog.txt I can open, read and write cool. What is the best way to delete all the file contents? Should I try rewriting the SD card file with NULL data? I have been reading the "SD.h" header file. I see a flush() and truncate() function should I use one of these?
or maybe I should just close and reopen the file, and overwrite the data. But I'm concerned that this might lead to some miss representations if the old data is not completely removed.
I am using a teensy 4.1 with built_in SD card.