2 module Main (main) where
4 import Control.Exception
6 import System.Directory
10 main = do tryIO $ removeFile to
11 cs_before <- getDirectoryContents "copyFile001dir"
13 print $ sort cs_before
15 cs_before <- getDirectoryContents "copyFile001dir"
17 print $ sort cs_before
20 tryIO :: IO a -> IO (Either IOException a)
24 from = "copyFile001dir/source"
25 to = "copyFile001dir/target"