[Dev-luatex] mkstemp or similar in lua(tex)
Hans Hagen
pragma at wxs.nl
Sat Nov 17 14:58:47 CET 2007
Norbert Preining wrote:
> Hi all!
>
> Frank Küster has rewritten texdoc in luatex and now it really works much
> better than the original one.
>
> But, we have a problem, the os.tmpname function.
>
> Could you recommend a procedure for creating a temporary DIRECTORY?
>
> os.tmpname already CREATES a file named in the return value, so
>
> tmpdir = os.tmpname();
> is_ok_tmpdir,error_string = lfs.mkdir(tmpdir)
>
> does not work.
maybe it opens a file just to be sure that the name is indeed reserved
an dnot taken by another process in tne meantime, so os.tmpdir() is
needed; i wonder, maybe it makse sense to accept an optional argument
that for the root so that one can generate a tmpdir at a specific
location i.e. tmpdir("/tmp") or so
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the dev-luatex
mailing list