HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Moduleunix-2.8.8.0Haskell2010

System.Posix.Temp.PosixString

POSIX temporary file and directory creation functions.

Synopsis
  • Packageunix-2.8.8.0
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePosixString.hsc

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.

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.