[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to get file size?
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 19 Apr 2011 11:42:55 +0200
On Tue, Apr 19, 2011 at 11:35 AM, Gilles Ganault <email@example.com> wrote:
> libs_file = io.open("librt.so.0","r")
> Am I missing some module it needs for file operation?
Not at all, you probably have not provided the full path to that
shared library, so libs_file ended up nil.
A tip: always say
f,err = io.open(...)
and check what err is when f is nil.
Some people do this
f = assert(io.open(...))
which does the job