RosettaCodeData/Task/Secure-temporary-file/Haskell/secure-temporary-file.hs

6 lines
241 B
Haskell

import System.IO
main = do (pathOfTempFile, h) <- openTempFile "." "prefix.suffix" -- first argument is path to directory where you want to put it
-- do stuff with it here; "h" is the Handle to the opened file
return ()