[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [NoW] Missing things from Lua
- From: Jeff Pohlmeyer <yetanothergeek@...>
- Date: Fri, 17 May 2019 16:05:19 -0500
On Fri, May 17, 2019 at 3:43 PM Sean Conner <sean@conman.org> wrote:
> I'm relunctant to add a C function *just for a constant*.
The GNU libc doc for BUFSIZ says "Actually, you can get an even better
value to use for the buffer size by means of the fstat system call: it
is found in the st_blksize field of the file attributes."
And `stat --help` says:
...
Valid format sequences for file systems:
...
%s block size (for faster transfers)
So maybe:
io.popen('stat -f / -c %s')
- Jeff