Nathaniel Smith spake unto us the following wisdom:
> To start with, there's absolutely no need to check that a path is a
> file before opening it for reading -- if it's not a file, then the
> read will fail just fine on its own.  I threw that assertion in
> because at the time I figured if we were already reading the whole
> file than a stat was too cheap to worry about, but if this is wrong
> then let's take that out and handle errors from read.

Is this true on all reasonable filesystems and operating environments?
I know that there are flavors of Unix out there (maybe *all* flavors
of Unix older than some age?) which will let you open() and read() a
directory.

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
                -- Cesare Beccaria, "On Crimes and Punishments", 1764

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to