next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc > The Macaulay2 language > file manipulation > temporaryFileName

temporaryFileName -- make a temporary file name

Synopsis

Description

The file name is so unique that even with various suffixes appended, no collision with existing files will occur. The files will be removed when the program terminates, unless it terminates as the result of an error.
i1 : temporaryFileName () | ".tex"

o1 = /tmp/M2-21917-0/0.tex
i2 : temporaryFileName () | ".html"

o2 = /tmp/M2-21917-0/1.html

This function will work under Unix, and also under Windows if you have a directory on the same drive called /tmp.

If the name of the temporary file will be given to an external program, it may be necessary to concatenate it with rootPath or rootURI to enable the external program to find the file.

See also