lua-users home
lua-l archive

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

> Today I noticed that these functions also return errno as third return value.
> This seems to be mentioned in PIL, but is omitted in the reference manual. Is
> this officialy part of the Lua API, and is it safe to depend on this behaviour?


  Unless otherwise stated, all I/O functions return nil on failure (plus
  an error message as a second result and a system-dependent error code
  as a third result) [...]


  os.remove (filename)
  [...] If this function fails, it returns nil, plus a string describing
  the error and the error code.


-- Roberto