no need to stub moveFile, it works
This commit is contained in:
parent
c45a723876
commit
93e3c8a09a
1 changed files with 1 additions and 9 deletions
|
@ -5,14 +5,10 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Utility.Directory where
|
||||
|
||||
import System.IO.Error
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.Posix.Files
|
||||
#endif
|
||||
import System.PosixCompat.Files
|
||||
import System.Directory
|
||||
import Control.Exception (throw)
|
||||
import Control.Monad
|
||||
|
@ -61,7 +57,6 @@ 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 ()
|
||||
#ifndef mingw32_HOST_OS
|
||||
moveFile src dest = tryIO (rename src dest) >>= onrename
|
||||
where
|
||||
onrename (Right _) = noop
|
||||
|
@ -89,9 +84,6 @@ 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.
|
||||
-
|
||||
|
|
Loading…
Reference in a new issue