Copyright | (c) Volker Stolz <vs@foldr.org> Deian Stefan <deian@cs.stanford.edu> |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org, vs@foldr.org, deian@cs.stanford.edu |
Stability | provisional |
Portability | non-portable (requires POSIX) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
POSIX temporary file and directory creation functions.
Synopsis
- mkstemp :: PosixString -> IO (PosixPath, Handle)
- mkstemps :: PosixString -> PosixString -> IO (PosixPath, Handle)
- mkdtemp :: PosixString -> IO PosixPath
Documentation
mkstemp :: PosixString -> IO (PosixPath, Handle) Source #
Make a unique filename and open it for reading/writing. The returned
PosixPath
is the (possibly relative) path of the created file, which is
padded with 6 random characters. The argument is the desired prefix of the
filepath of the temporary file to be created.
If you aren't using GHC or Hugs then this function simply wraps mktemp and so shouldn't be considered safe.
mkstemps :: PosixString -> PosixString -> IO (PosixPath, Handle) Source #
mkdtemp :: PosixString -> IO PosixPath Source #
Make a unique directory. The returned PosixPath
is the path of the
created directory, which is padded with 6 random characters. The argument is
the desired prefix of the filepath of the temporary directory to be created.
If you aren't using GHC or Hugs then this function simply wraps mktemp and so shouldn't be considered safe.