Moduletemporary-1.3Haskell2010
System.IO.Temp
Functions to create temporary files and directories.
Most functions come in two flavours: those that create files/directories
under the system standard temporary directory and those that use the
user-supplied directory.
The functions that create files/directories under the system standard
temporary directory will return canonical absolute paths (see
getCanonicalTemporaryDirectory). The functions use the user-supplied
directory do not canonicalize the returned path.
The action inside withTempFile or withTempDirectory is allowed to
remove the temporary file/directory if it needs to.
Templates and file names
The treatment of templates differs somewhat for files vs directories.
For files, the template has form name.ext, and a random number will be
placed between between the name and the extension to yield a unique file
name, e.g. name1804289383846930886.ext.
For directories, no extension is recognized.
A random hexadecimal string (whose length depends on the system's word
size) is appended to the end of the template.
For instance,
the directory template dir may result in a directory named
dir-e4bd89e5d00acdee.
You shouldn't rely on the specific form of file or directory names
generated by the library; it has changed in the past and may change in the future.
Contents
- Re-exports from System.IO
- Auxiliary functions
Synopsis