diff options
author | Joey Hess <id@joeyh.name> | 2013-05-10 15:08:53 -0500 |
---|---|---|
committer | Joey Hess <id@joeyh.name> | 2013-05-10 15:08:53 -0500 |
commit | 493db9a024a89f1f696a858789ce55844a180215 (patch) | |
tree | 3d34bea905c3623156a07406f027bf50e005c881 /Utility/Directory.hs | |
parent | 720d0230d6333a3cc3a7d533ef09e921ed6b0d8f (diff) |
stub out posix stuff for Windows
This is enough to let the configure program build.
Diffstat (limited to 'Utility/Directory.hs')
-rwxr-xr-x[-rw-r--r--] | Utility/Directory.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Utility/Directory.hs b/Utility/Directory.hs index 7cce4a68f..55d79a825 100644..100755 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -5,10 +5,14 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Utility.Directory where import System.IO.Error +#if 0 import System.Posix.Files +#endif import System.Directory import Control.Exception (throw) import Control.Monad @@ -57,6 +61,7 @@ dirContentsRecursive' (dir:dirs) = unsafeInterleaveIO $ do {- Moves one filename to another. - First tries a rename, but falls back to moving across devices if needed. -} moveFile :: FilePath -> FilePath -> IO () +#if 0 moveFile src dest = tryIO (rename src dest) >>= onrename where onrename (Right _) = noop @@ -84,6 +89,9 @@ moveFile src dest = tryIO (rename src dest) >>= onrename case r of (Left _) -> return False (Right s) -> return $ isDirectory s +#else +moveFile = error "moveFile TODO" +#endif {- Removes a file, which may or may not exist. - |