Secure temporary file: Difference between revisions

Content deleted Content added
added haskell
Line 39: Line 39:
// both can only be accessed by the current user (the program?).
// both can only be accessed by the current user (the program?).
}</d>
}</d>

=={{header|Haskell}}==
<pre>
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 ()
</pre>


=={{header|OCaml}}==
=={{header|OCaml}}==