module name change.
This commit is contained in:
14
test/Dir.hs
Normal file
14
test/Dir.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
module Dir where
|
||||
|
||||
import System.Directory
|
||||
import Control.Exception as E
|
||||
|
||||
withDirectory_ :: FilePath -> IO a -> IO a
|
||||
withDirectory_ dir action = bracket getCurrentDirectory
|
||||
setCurrentDirectory
|
||||
(\_ -> setCurrentDirectory dir >> action)
|
||||
|
||||
withDirectory :: FilePath -> (FilePath -> IO a) -> IO a
|
||||
withDirectory dir action = bracket getCurrentDirectory
|
||||
setCurrentDirectory
|
||||
(\d -> setCurrentDirectory dir >> action d)
|
||||
Reference in New Issue
Block a user