
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:000e01c54fdb$be752eb0$6401a8c0@pdimov2...
Beman Dawes wrote:
I've completed an analysis of expectations for the exists() and is_xxx() family of functions, and the previously suggested status() and symlink_status() functions.
See http://www.esva.net/~beman/filesystem_operations_predicates.htm
Thanks to Peter Dimov, Rob Stewart, and Jeff Garland for their suggestions. Errors are mine alone.
Comments?
One quick comment about status(). I don't like the fact that the user effectively has to read a global variable to obtain the error code. I'd prefer something along the lines of
status_flag status( path const & p, int * error = 0 );
or packing the error code in the return value.
I share your concern. Let me think about it a bit more.
I also don't like the fact that the error codes aren't the standard errno E* constants, but we already had this debate once. :-) (As with threading, it is my opinion that Posix should be acknowledged.)
The intent _is_ to supply the actual system error code (errno for POSIX). There is another function available to convert to a portable code if desired. Thanks, --Beman