Re: File System Library
Thatcher Ulrich <[email protected]> Wed, 11 Aug 2004 12:03:37 -0400
| Newsgroups | gmane.comp.lang.lua.luacheia |
|---|---|
| Message-ID | <[email protected]> |
On Aug 11, 2004 at 11:23 -0300, Tomas wrote: > > yesterday Martin Spernau convinced me to join this list, > even not being a LuaCheia developer. I'm working for the Kepler > Project and we have faced the same problem of lacking of file system > functions, like chdir, stat, lock, unlock etc. We also developed a > File System library with almost the same functions as yours. > As I told Martin, we think it would be better to join the > efforts and maybe merge the two libraries into a single one that could > serve both projects. But we have a slightly different API that I > would like to discuss. Here it is: > > lfs.chdir (path) > lfs.currentdir () -> returns a string > lfs.dir (path) -- directory iterator > lfs.lock (filehandle, mode[, start[, length]]) > lfs.mkdir (dirname) > lfs.unlock (filehandle[, start[, length]]) > > We intend to add lfs.attributes (filepath [, attributename]) > also. This function will return a string or a table (if attributename > is missed) with the attribute(s). That looks nice, the directory iterator is a better approach than what we currently have, which just returns a whole table of strings, or a table of tables. Also we don't have lock/unlock, so that's useful. I would be happy if we adopted this in addition to (or in place of) our existing fs module. > Another doubt I have is if it is better to improve lposix to > work on Windows. What do you think? My inclination would be to leave the lposix question up to LHF, unless there's strong user demand for a Windows version. -- Thatcher Ulrich http://tulrich.com ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285