haskell / haskell/unix

Add st_blocks binding

Open
#189 2 comments 0 reactions 0 assignees View on GitHub
help wanted type: enhancement
Dominant language
Haskell
Stars
124
Forks
99
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.