Working with the file system.
- data PropFile
- inDir :: FilePath -> Build a -> Build a
- inScratchDir :: FilePath -> Build a -> Build a
- clobberDir :: FilePath -> Build ()
- ensureDir :: FilePath -> Build ()
- withTempFile :: (FilePath -> Build a) -> Build a
- atomicWriteFile :: FilePath -> String -> Build ()
Properties of the file system we can test for.
Some executable is in the current path.
Some file exists.
Some directory exists.
Some file is empty.
Run a command in a different working directory. Throws an error if the directory doesn't exist.
Create a new directory with the given name, run a command within it, then change out and recursively delete the directory. Throws an error if a directory with the given name already exists.
Delete a dir recursively if it's there, otherwise do nothing.
removeDirectoryRecursive, this function does
not follow symlinks, it just deletes them.
Create a new directory if it isn't already there, or return successfully if it is.
Create a temp file, pass it to some command, then delete the file after the command finishes.