|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-05-03 19:30:03
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:000e01c54fdb$be752eb0$6401a8c0_at_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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk