lua-users home
lua-l archive

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


Peter Hill:
> There seems to be a variety of places to intercept. Perhaps there should
> be a single internal function (eg, "io.checkpath") that all these
> functions use. It could take the specified path and return the real path
> (or nil if the specified path is invalid).

RLake:
> I like that idea for its simplicity, and it would definitely be useful in
> some instances.
>
> However, I think the real world is slightly more complex. Checkpath would
> at least want to know whether you were planning to read, write, or execute
> the file (or possibly even dynamically load it as a DLL or equivalent).
> These might all have different access restrictions.

Agreed. Trying to make these classifications as OS independent as possible
would be good.

> By the way, writing a checkpatch function would be very OS specific.

Which is a good reason to wrap it all in one function rather than spread
it through several.

*cheers*
Peter Hill.