- find :: FilePath -> IO [(FilePath, FileStatus)]
- removeRecursiveSafely :: FilePath -> IO ()
- unmountRecursiveSafely :: FilePath -> IO ()
- renameFileWithBackup :: FilePath -> FilePath -> IO ()
- withWorkingDirectory :: FilePath -> IO a -> IO a
- withTemporaryDirectory :: FilePath -> (FilePath -> IO a) -> IO a
- mkdtemp :: FilePath -> IO FilePath
Traverse a directory and return a list of all the (path, fileStatus) pairs.
Recursively remove a directory contents on a single file system. The adjective "Safely" refers to these features: 1. It will not follow symlinks 2. If it finds a directory that seems to be a mount point, it will attempt to unmount it up to five times. If it still seems to be a mount point it gives up 3. It doesn't use procmounts, which is ambiguous or wrong when you are inside a chroot.
Like removeRecursiveSafely but doesn't remove any files, just unmounts anything it finds mounted. Note that this can be much slower than Mount.umountBelow, use that instead.
Rename src to dst, and if dst already exists move it to dst~. If dst~ exists it is removed.
temporarily change the working directory to |dir| while running |action|
create a temporary directory, run the action, remove the temporary directory the first argument is a template for the temporary directory name the directory will be created as a subdirectory of the directory returned by getTemporaryDirectory the temporary directory will be automatically removed afterwards. your working directory is not altered