#7345: unix-2.6.0.0 does not provide access to st_blksize and st_blocks ------------------------------+--------------------------------------------- Reporter: JohnWiegley | Owner: Type: bug | Status: new Priority: normal | Component: libraries/unix Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- 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. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7345> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs