Hi Bernd,
According to the luaposix doc, a successful call to function mkstemp() returns
int open file descriptor
But I noticed that it also returns the created file name as second value, which is very convenient. Is it just a documentation error, in other words, can I rely on this behaviour, or not?
You can rely on this behavior. The 'Or' in the mkstemp documentation comes a line too early - before the next release, I'll fix it to correctly read... Returns:- int open file descriptor
- string path to file, if successful
Or- nil
- string error message
- int errnum
-- Bernd
Cheers, Gary |