[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to detect if argument is a file handle
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 19 Nov 2002 14:59:10 -0200
>How can I detect that an argument is an filehandle?
Compare its metatable with that of io.stdin:
function isfilehandle(f)
return getmetatable(f)==getmetatable(io.stdin)
end
--lhf