[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to get file size?
- From: Gilles Ganault <gilles.ganault@...>
- Date: Tue, 19 Apr 2011 12:07:01 +0200
On Tue, 19 Apr 2011 11:42:38 +0200, Jerome Vuarand
<jerome.vuarand@gmail.com> wrote:
>You have to check the return value from io.open. It may be nil, and
>followed by an error message:
>
>libs_file,msg = io.open("librt.so.0","r")
>if not libs_file then
> error(msg)
>end
Thanks for the tip. I tried both the above and assert() and found that
they provide the same amount of information on the error.