Anonymous user
Secure temporary file: Difference between revisions
new Emacs Lisp
m (Added Sidef language) |
(new Emacs Lisp) |
||
Line 116:
// both can only be accessed by the current user (the program?).
}</lang>
=={{header|Emacs Lisp}}==
<code>make-temp-file</code> creates a new empty temporary file, with perms "0700" so read-write to the current user only.
<lang Lisp>(make-temp-file "prefix")
=>
"/tmp/prefix25452LPe"</lang>
<code>make-temp-file</code> is available in GNU Emacs 21 up, but not XEmacs 21.4. The Gnus included with XEmacs 21.4 has an <code>mm-make-temp-file</code> in its <code>mm-util.el</code>, or the [[APEL]] library can supply a <code>make-temp-file</code> (and for Emacs 20 too).
=={{header|Go}}==
|