Re: How to get file size?
[
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: 2011年4月19日 12:07:01 +0200
On 2011年4月19日 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.