> if local fd, err = io.open("file", "r") then
> print(fd:read("*a"))
> else
> print("failed!", err)
> end
This is too heavy nested in case of 2 files or if you open an array of
files you have to use recursion. So this is not like it should be.
You could make an array that calls __close on its contents whenever its own __close metamethod is called. This would not require recursion.