[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: LUA 4.x - filesystem access limit?
- From: <P.Gertman@...>
- Date: Wed, 24 Sep 2003 16:06:28 +0400
--what about such a redefine:
-- redefine `readfrom'
function readfrom (name)
return %readfrom(some_root_path..name) -- call the original `readfrom' with root path prepended to a name
end
> The "standard" technique is to redefine the open functions. Something
> like the following:
>
> -- redefine `readfrom'
> function readfrom (name)
> if not isOk(name) then
> error("cannot open file " .. name)
> end
> return %readfrom(name) -- call the original `readfrom'
> end
>
> ... -- the same for writeto, etc.
>
> -- Roberto
>