unix icon indicating copy to clipboard operation
unix copied to clipboard

Add st_blocks binding

Open cblp opened this issue 4 years ago • 2 comments

As stat(2) states on my system, there is a field st_blocks in struct stat, which represents

The actual number of blocks allocated for the file in 512-byte units. As short symbolic links are stored in the inode, this number may be zero.

For sparse files, this size may differ significantly from st_size (fileSize here), which represents apparent/logical/virtual file size.

st_size is needed for implementing a du-like utility.

Please bind this field too.

cblp avatar May 29 '21 12:05 cblp

Sounds reasonable. Would you like to propose a PR?

hs-viktor avatar Apr 11 '22 22:04 hs-viktor

Sorry, I'm not sure I have enough expertise.

cblp avatar Apr 13 '22 08:04 cblp