Home/Support/Support Forum/Ffunction that the contents of a file deletes ?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Ffunction that the contents of a file deletes ?

0 votes
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
asked Dec 13, 2007 in NET+OS by mentzer New to the Community (25 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

1 Answer

0 votes
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.
answered Dec 19, 2007 by harding New to the Community (14 points)
...