From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-09 08:27:38
Beman Dawes wrote:
> But if stat() doesn't report both S_ISDIR and S_ISREG true at the
> same time, there isn't any way to practically implement status(),
> even if you buy the argument that reporting both would be desirable.
S_ISREG is is_regular_file, not is_stream. /dev/urandom is not a regular
file, but it is a stream, IIUC (a "character special file", probably, I
don't have a POSIX system at the moment handy).
is_file specification aside, an implementation of the standard library is
not required to be portable, so it can exploit whatever platform-specific
information it wants, unless you want to _specifically disallow_ this in the
specification of status().
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk