lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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.