Skip to main content

tmpname

Function tmpname 

Source
pub fn tmpname() -> string
Expand description

Returns a name usable for a temporary file.

§Return value

A string with a file name that can be used for a temporary file. The file must be explicitly opened before use and explicitly removed when no longer needed. When possible, prefer io::tmpfile, which removes the file automatically when the program ends.

§Examples

local name = os.tmpname()
print(name)    --> /tmp/lua_Fx3kzM

§See also

io::tmpfile