[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function to truncate a file
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 27 Sep 2018 08:25:21 -0300
> At least on macOS there's no difference between truncate+0 and fopen:
> Perhaps Luiz was mistaken or being intentionally vague
I think I meant that io.open(path, "w") might potentially imply in
removing the file and creating a new one.
OTOH, the man page for fopen in both macOS and Linux say
w Truncate file to zero length or create text file for writing.
That's exactly what the C99 standard says too.