diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-09 19:08:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-09 19:08:10 -0400 |
commit | d6e77595ba45762b3c2dfdcd47a2d6b5b70154ae (patch) | |
tree | 896615a59c8f67f3bfec97c55616b7e59017927b /Utility/StatFS.hsc | |
parent | 789254747bceeaac004236275a6c1906f859945a (diff) |
factor out Utility.FileSystemEncoding
Diffstat (limited to 'Utility/StatFS.hsc')
-rw-r--r-- | Utility/StatFS.hsc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Utility/StatFS.hsc b/Utility/StatFS.hsc index 51a6bda1e..58d0b3e02 100644 --- a/Utility/StatFS.hsc +++ b/Utility/StatFS.hsc @@ -47,15 +47,14 @@ module Utility.StatFS ( FileSystemStats(..), getFileSystemStats ) where +import Utility.FileSystemEncoding + import Foreign import Foreign.C.Types import Foreign.C.String import GHC.IO.Encoding (getFileSystemEncoding) import GHC.Foreign as GHC -withFilePath :: FilePath -> (CString -> IO a) -> IO a -withFilePath fp f = getFileSystemEncoding >>= \enc -> GHC.withCString enc fp f - #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) # include <sys/param.h> # include <sys/mount.h> |