Hi Digi community,
Is there a function that the contents of a file deletes? I want to create a file and deletes the content in fixed intervals. Then I will store new data in the file !
Thank you.
Marcus
Hi Digi community,
Is there a function that the contents of a file deletes? I want to create a file and deletes the content in fixed intervals. Then I will store new data in the file !
Thank you.
Marcus
AFAIK, there is no way to truncate a file in standard C file I/O. Best bet is to remove() the file and then recreate it. You could look at the lower-level NAFS_ functions but I don’t think there is any way to truncate with them either.