[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaFileSystem 1.2.1 Released (Andre Carregal)
- From: Tomas Guisasola Gorham <tomas@...>
- Date: Wed, 23 May 2007 10:33:44 -0300 (BRT)
Hi Peter
> Tomas Guisasola Gorham wrote:
> > I think Peter has summarized the options we have:
> >
> >> * have lfs.attributes() accept an optional argument not to follow links, which
> >> is backwards compatible, assuming no redundant arguments are passed;
> >> * add a function which doesn't follow links;
> >> * perform stat() aswell as lstat() in lfs.attributes(), which means both modes
> >> can be returned.
> > I am not sure what should be done in the last option. Suppose
> > `lfs.attributes' performs both `stat' and `lstat'. What will be the
> > result of `mode'?
>
> Sorry for the confusion :). I meant for the last option to be compatible with
> duck's original request, i.e. return a table of mode strings (which could
> indicate `file', `directory', `link to file', `link to directory', `link to
> nothing', etc.). I wouldn't personally go this way because I think the user
> should follow links unless he/she explicitly requests not to (lstat/lattributes).
Ok. Then I think we could reduce the options to two :-)
At the moment I'll stay with Sam's implementation, just changing
the name of the new function to `linkattributes':
lfs.linkattributes("link", "mode") --> "link"
lfs.attributes("link", "mode") --> "file"
What do you think?
Tomás