temporary-resourcet-0.1.0.1: Portable temporary files and directories with automatic deletion

Safe HaskellNone
LanguageHaskell98

System.IO.Temp

Synopsis

Documentation

createTempDirectory Source #

Arguments

:: MonadResource m 
=> Maybe FilePath

optional parent directory

-> String

filename template; for security, a random number will be inserted between the filename and any extension.

-> m (ReleaseKey, FilePath) 

Create a temporary directory. The directory will be deleted if empty when the resource is released. If a parent directory is supplied, the temporary directory will be created there; otherwise, it will be created in the system temporary directory returned by getTemporaryDirectory.

openBinaryTempFile Source #

Arguments

:: MonadResource m 
=> Maybe FilePath

optional parent directory

-> String

filename template; for security, a random number will be inserted between the filename and any extension.

-> m (ReleaseKey, FilePath, Handle) 

Open a temporary file in binary mode. The file will be readable and writeable, but only by the current user. The file will be deleted when the resource is released, if it still exists. If a parent directory is supplied, the file will be created there; otherwise, it will be created in the system temporary directory returned by getTemporaryDirectory.

openTempFile Source #

Arguments

:: MonadResource m 
=> Maybe FilePath

optional parent directory

-> String

filename template; for security, a random number will be inserted between the filename and any extension.

-> m (ReleaseKey, FilePath, Handle) 

Open a temporary file. The file will be readable and writeable, but only by the current user. The file will be deleted when the resource is released, if it still exists. If a parent directory is supplied, the file will be created there; otherwise, it will be created in the system temporary directory returned by getTemporaryDirectory.