I have a file that currently contains sample times that being continuously written to the file:
[SampleTimes]
0=0
853=0.021325
1706=0.04265
I want to add a commment section so that the file will look like this:
[SampleTimes]
0=0
853=0.021325
1706=0.04265
[Comments]
3.69555,0,0,65536,test text
7.25082,0,0,65536,asdffdsa
9.74452,0,0,65536,qwert
However, the comment section are events that are also being continuously written to file. Is there a way to shift the cursor to append to the sample times when needed and then shift it back to append to the end of the file when a comment comes in?
I’ve seen other posts but they all recreate the file which I can’t do as there could be some data loss.
Been Moo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.