We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm writing CVS formatted data to a log file. When the system loses power unexpectedly and the write operation is interrupted it can happen that the last line of the file is incomplete (fewer columns). To tidy up the file I want to remove the last line. Currently the only option to do this seems to copy the entire file, which is quiet inefficient (files can have 100MB to 1GB). On a unix system one could use the ftruncate function to remove the tail of the file. Is there a similar (efficient) option for the Keil filesystem?
Best,
Valentin
And you absolutely have to let that immutable tool have direct access to the file on your device? There's no way you can let it operate on a filtered copy of the log?
If I can't get the above solution to work, this would probable be the to go solution.