Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add st_blocks binding #189

Open
cblp opened this issue May 29, 2021 · 2 comments
Open

Add st_blocks binding #189

cblp opened this issue May 29, 2021 · 2 comments

Comments

@cblp
Copy link

cblp commented May 29, 2021

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.

@hs-viktor
Copy link
Contributor

Sounds reasonable. Would you like to propose a PR?

@cblp
Copy link
Author

cblp commented Apr 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants