summaryrefslogtreecommitdiff
path: root/Utility/Touch.hsc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-09 19:08:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-09 19:08:10 -0400
commitd6e77595ba45762b3c2dfdcd47a2d6b5b70154ae (patch)
tree896615a59c8f67f3bfec97c55616b7e59017927b /Utility/Touch.hsc
parent789254747bceeaac004236275a6c1906f859945a (diff)
factor out Utility.FileSystemEncoding
Diffstat (limited to 'Utility/Touch.hsc')
-rw-r--r--Utility/Touch.hsc5
1 files changed, 2 insertions, 3 deletions
diff --git a/Utility/Touch.hsc b/Utility/Touch.hsc
index 24ccd17a6..b84054cbc 100644
--- a/Utility/Touch.hsc
+++ b/Utility/Touch.hsc
@@ -13,15 +13,14 @@ module Utility.Touch (
touch
) where
+import Utility.FileSystemEncoding
+
import Foreign
import Foreign.C
import Control.Monad (when)
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
-
newtype TimeSpec = TimeSpec CTime
{- Changes the access and modification times of an existing file.