apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: proposal to add apr_check_dir_empty() to APR
Date Tue, 02 Jul 2002 20:23:11 GMT
I agree with Ryan on all points, and I have one additional comment:

On Tue, Jul 02, 2002 at 01:07:59PM -0700, Ryan Bloom wrote:
> The return code should not be EGENERAL if the directory isn't empty.
> Create a new status code if you have to, but a non-empty directory is
> not an error condition.

I agree. EGENERAL is not the polar opposite of SUCCESS. APR isn't
really friendly with simple binary functions that want to return errors.
It seems like you just want to return true or false in the normal case,
but also have the option to return an error if something blows up.
Adding another apr_status_t code would be ok.  Maybe APR_FAILURE to
complement APR_SUCCESS, or we could go all out and add APR_TRUE
and APR_FALSE...

just my 2c,

View raw message