a `st_blksize` analog for `filestat`
Opened this issue · 0 comments
sunfishcode commented
Some applications rely on struct stat
to contain a st_blksize
field to determine what size buffer to use. filestat
doesn't currently provide this information.
It may also be useful to have a field providing the size of the file without any "holes" included, which would let libc implement a st_blocks
field. POSIX's st_blocks
is in 512-byte units (regardless of the st_blksize
value), which is awkward, but if WASI itself simply provides the size in bytes, libc can divide by 512 to satisfy POSIX.