lua-users home
lua-l archive

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

I have a FILE* which I would like to pass from a C function to a Lua
function, such that the Lua code can treat it as an io.* file (i.e. call
methods on it like file:read(), file:seek(), file:close() etc.)

Is there any way to do this?

Unfortunately opening the file from within Lua is not possible in this
case; A 3rd-party library has already opened the file (and the API
offers no way to obtain the path.)

- Finn