lua-users home
lua-l archive

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

On Tue, 28 Mar 2006 13:49:54 -0500 Javier Guerra <>
> > I'm actually using luafilesystem but I think it would be great to
> > have others functions :
> > - a recursive flag for mkdir
> > - a copy function (which would be able to copy folders)
> > - maybe some functions to know if a file exists
> > - basename and dirname
> > - chmod, chown
> > - a way to create named pipes on unix systems (mkfifo)
> most of those are obvious from the *nix point of view, but i think=20
> luafilesystem aims to be platform agnostic.  Luiz has a different
> module:=20 luaPosix, that exports most of the usual *nix C API.

I agree that chmod, chown and mkfifo are unix only ... but not the
others (recursive mkdir, copy, file_exisis, basename, dirname)

But even for chmod and chown ... these functions can exist in
luafilesystem without problems. There is already unix attributes to the
attribute() function.
On others systems, these functions would have no effect ... and it
would be easier on unix systems.

> i guess that last line can be left out, making the whole routine just:
> getmetatable(object)[key]=3Dvalue

Thanks for that. I never realized it was possible.

Mildred       <> <>
Clef GPG :    <hkp://> ou <>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]