#7345 closed bug (wontfix)

unix-2.6.0.0 does not provide access to st_blksize and st_blocks

Reported by: JohnWiegley Owned by:
Priority: normal Milestone:
Component: libraries/unix Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

There is currently no clear way in Haskell to determine how much disk space a file actually occupies on disk -- only it's apparent byte size. Case in point, the popular git-annex tool has had to rely on a hack because there is no way to get at the st_blocks information in the POSIX stat record.

I recommend adding two functions to Common.hsc in unix, which are in the attached patch.

Attachments (1)

fileBlocks.patch (1.9 KB) - added by JohnWiegley 18 months ago.

Download all attachments as: .zip

Change History (2)

Changed 18 months ago by JohnWiegley

comment:1 Changed 12 months ago by igloo

  • Difficulty set to Unknown
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the suggestion. However, library API changes need to be discussed on the libraries list first, and then a ticket opened once consensus is reached; please see http://www.haskell.org/haskellwiki/Library_submissions for details.

Note: See TracTickets for help on using tickets.