Why don't you simply open the file in non-append mode? you'd get the same result as truncate plus append.
In reply to Re: empty a file by l3nz in thread empty a file by GS