|
I've recently run into the problem of trying to truncate a file in lua... which doesn't seem to be possible Not only is it not covered by the standard library; its also not in lfs:(
Because of your post I noticed that this function is supported by the Apache Portable Runtime but is not included in my Lua/APR binding, so I just added it (in version 0.23.1, released today):
http://peterodding.com/code/lua/apr/docs/#apr.file_truncateI realize that if all you want to do is truncate a file, the Apache Portable Runtime is kind of a big dependency. However, should you be using it anyway, this might help :-)
- Peter