lua-users home
lua-l archive

Re: How to get file size?

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


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.

AltStyle によって変換されたページ (->オリジナル) /