Ticket #7345 (closed bug: wontfix)

Opened 8 months ago

Last modified 2 months ago

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

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

Change History

Changed 8 months ago by JohnWiegley

Changed 2 months ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to wontfix

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.