diff options
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. - |