[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Function to truncate a file
- From: Paul K <paul@...>
- Date: Wed, 26 Sep 2018 17:25:39 -0700
I'd like to come back to Daurnimator's suggestion to add a file
truncation function to Lua
(http://lua-users.org/lists/lua-l/2011-12/msg00111.html).
I know Luiz responded "truncating to zero length is the same as
opening for writing, except for dates", but it's beneficial in many
cases to write to the same file, as it preserves its attributes,
metadata, permissions, etc.
Paul.