lua-users home
lua-l archive

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

On Sun, Nov 28, 2010 at 3:23 PM, Gavin Wraith <> wrote:
> of objects in the directory represent the keys.  Filetypes can be
> defined for types of value - textfiletype for strings, for example.
> The analogy cannot be pushed too far, but it is good food for thought.
> Metatables for files, anybody? :)-

Especially if it were a 'lazy tree' - so that e.g. dirtree.usr.local
is only populated when accessed.

(This is where custom ipairs can be useful.)

Particularly cool hacks possible with pseudo-filesystems like /proc on
(some) Unixes.

steve d.