[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: file:write() fails silently for read-only files
- From: Xavier Wang <weasley.wx@...>
- Date: Tue, 6 Sep 2011 23:02:24 +0800
fwrite may not know its operating a read mode file....
在 2011-9-6 下午2:39，"HyperHacker" <email@example.com
> Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
>> f=io.open('foo.foo', 'r')
> Call me crazy, but I feel like f:write() should throw an error when
> trying to write to a read-only file, instead of just doing nothing.
> Sent from my toaster.