[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: truncating a file
- From: Daurnimator <quae@...>
- Date: Mon, 5 Dec 2011 12:47:03 +1100
On 5 December 2011 12:44, Luiz Henrique de Figueiredo
>> I've recently run into the problem of trying to truncate a file in
>> lua... which doesn't seem to be possible
> truncating to zero length is the same as opening for writing, except for dates.
The functionality required is to shorten a file:
To do so now; you have make a new file and copy the old one across up
to the point you want.
Truncating to 0 length is a different problem :)
I really can't believe ftruncate didn't make it into ANSI C :(