Synopsis:
The file name is so unique that even with various suffixes appended, no collision with existing files should occur. But no check is done to see whether such files are present.
i1 : temporaryFileName () | ".tex" |
i2 : temporaryFileName () | ".html" |
This function will work under Unix, and also under Windows if you have a directory on the same drive called tmp.
Code:
-- ../../../Macaulay2/m2/files.m2:8-11 temporaryFileName = () -> ( counter = counter + 1; "/tmp/M2-" | toString processID() | "-" | toString counter )