lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

What's the status of os.tmpname()? Is it MIA? Is it depreciated?

The Lua 5.0 Reference Manual states its existence:

"os.tmpname()

Returns a string with a file name that can be used for a temporary file. The file must be explicitly opened before its use and removed when no longer needed.

This function is equivalent to the tmpnam C function, and many people (and even some compilers!) advise against its use, because between the time you call this function and the time you open the file, it is possible for another process to create a file with the same name."

lua-5.1-work4 and lua51w4-rvm denies it:

lua: Main.lua:7: `tmpname' not supported
stack traceback:
        [C]: in function `tmpname'
        Main.lua:7: in main chunk
        [C]: ?

What gives?


Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/