[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaFileSystem 1.2.1 Released (Andre Carregal)
- From: Sam Roberts <sroberts@...>
- Date: Tue, 22 May 2007 11:54:51 -0700
On Sun, May 20, 2007 at 02:09:37AM +0000, duck wrote:
> Perfect. I'd suggest that "mode" return exactly what it does now, namely
> the _first_ mode flag which matches. Here is the current code:
>
> if ( S_ISREG(mode) ) return "file";
> else if ( S_ISDIR(mode) ) return "directory";
> else if ( S_ISLNK(mode) ) return "link";
> else if ( S_ISSOCK(mode) ) return "socket";
> else if ( S_ISFIFO(mode) ) return "named pipe";
> else if ( S_ISCHR(mode) ) return "char device";
> else if ( S_ISBLK(mode) ) return "block device";
> else return "other";
>
> There is no point in changing the semantics of "mode". Indeed, it ought
> not to be changed.
>
> OTOH, "modes" should return an associative table of _all_ the above strings
> which match (except "other", of course, which would be denoted by an empty
> table).
But its impossible for more than one of the above modes to match!
Cheers,
Sam