[alexandria-devel] Proposed addition of temporary file creation utilities

Faré fahree at gmail.com
Sun Apr 22 15:51:39 UTC 2012


On Sun, Apr 22, 2012 at 09:35, Hans Hübner <hans.huebner at gmail.com> wrote:
> Hi,
>
> following up on an IRC discussion yesterday, I am proposing the
> addition of the OPEN-TEMPORARY function and WITH-OPEN-TEMPORARY-FILE
> macro below (and on http://paste.lisp.org/display/129090#14).  It
> implements functionality that is commonly required, but that is not
> available in any other library in a portable fashion.  osicat has been
> suggested, but it does not implement temporary file handling on
> Windows.
>
> This posting is to determine whether there is opposition regarding
> inclusion in Alexandria.  I'll re-post as a proper patch including
> symbol exports when there is agreement to include it.
>
xcvb-driver includes a with-temporary-file facility that does more
than your proposed code,
including support for open or closed temporary files
(and if open, with proper element-type and external-format),
binding or not binding the pathname,
decent defaults for a temporary directory on Windows and RMCL (but not genera),
and whether to keep the file or not outside the body.

The main missing feature is proper umask settings on Unix,
or at least a hook for such settings to be added on top.
That means that the feature cannot be used where security matters,
or the underlying call-with-temporary-file function must be wholly replaced.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Have the courage to take your own thoughts seriously, for they will shape you.
                — Albert Einstein




More information about the alexandria-devel mailing list