> how do I get the path used to generate the temp file created by io.tmpfile() You can't. The whole point of tmpfile is to give you a file handle without giving you the file name to avoid race conditions.