mockery-0.3.5: Support functions for automated testing

Test.Mockery.Directory

Synopsis

# Documentation

inTempDirectory :: IO a -> IO a Source #

Run given action with the current working directory set to a temporary directory.

The directory is created before the action is run. After the action has completed the directory is removed and the current working directory is restored to its original value.

Similar to inTempDirectory, but the temporary directory will have the specified name.

withFile :: String -> (FilePath -> IO a) -> IO a Source #

Create a temporary file with the given contents and execute the given action.

The file is removed after the action has completed.

touch :: FilePath -> IO () Source #

Update the modification time of the specified file. Create an empty file (including any missing directories in the file path) if the file does not exist.