main :: IO ()
main = do d <- getCurrentDirectory
flip finally (setCurrentDirectory d) $ do
- setCurrentDirectory "copyFile"
+ setCurrentDirectory "copyFile002dir"
tryIO $ removeFile to
cs_before <- getDirectoryContents "."
putStrLn "Before:"
readFile to >>= print
tryIO :: IO a -> IO (Either IOException a)
-tryIO = try
+tryIO = try
from, to :: FilePath
from = "source"