Re: If we cannot change file system semantics, we must concede that Bill Gates is right that Linux c

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Fri, 2 Jul 1999 20:32:18 +0200


Pavel Machek wrote:
> But what do you think ls does when listing directory?
[snip open("/etc/", O_RDONLY|O_NONBLOCK)]
> And ls would probably be very unhappy if it got some kind of
> index.html file instead of listing.

That depends.. do you want the thing to look like a file or a directory?

If it's a document _represented_ as a directory, surely you want it to
appear as a file in listings? So `ls document' will show one entry, not
the components of the document.

If you want it to look like a directory to ls, no problem.
readdir() will work as usual.

BTW my `ls /etc' opens "/etc" not "/etc/" -- the latter follows symbolic
links. Even if you say `ls -l /etc/' (though that's a GNU-ism).

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/