From 493db9a024a89f1f696a858789ce55844a180215 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 May 2013 15:08:53 -0500 Subject: stub out posix stuff for Windows This is enough to let the configure program build. --- Utility/Directory.hs | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100644 => 100755 Utility/Directory.hs (limited to 'Utility/Directory.hs') diff --git a/Utility/Directory.hs b/Utility/Directory.hs old mode 100644 new mode 100755 index 7cce4a68f..55d79a825 --- 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. - -- cgit v1.2.3