New API: use CopyMode for overwriting and introduce RecursiveMode

This allows to specify the behavior on recursive operations,
such that one can collect failures instead of dying on the first
failure.
This commit is contained in:
2016-06-05 03:10:28 +02:00
parent 2a0a88a96d
commit 64ae6db83a
23 changed files with 831 additions and 420 deletions

View File

@@ -4,6 +4,7 @@ module HPath.IO.DeleteFileSpec where
import Test.Hspec
import HPath.IO
import System.IO.Error
(
ioeGetErrorType
@@ -17,8 +18,6 @@ import GHC.IO.Exception
IOErrorType(..)
)
import Utils
import qualified Data.ByteString as BS
import Data.ByteString.UTF8 (toString)
setupFiles :: IO ()
@@ -55,6 +54,7 @@ spec = before_ setupFiles $ after_ cleanupFiles $
it "deleteFile, symlink, all fine" $ do
recreateSymlink' "syml"
"testFile"
Strict
deleteFile' "testFile"
getSymbolicLinkStatus "testFile"
`shouldThrow`