apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject apr file questions
Date Wed, 17 Apr 2002 09:01:46 GMT
I've two questions regarding coding with apr_file_ family

1. Is it a good idea to apr_file_mktemp with APR_BUFFERED flag on? The 
current default is off.

2. What's the idiomatic apr read till eof? From grepping the source 
code, I see apr_file_eof is hardly ever used. Is something wrong with:

         while (!apr_file_eof(fp)) {
             rc = apr_file_read(fp, buf, &nbytes);

I saw code like this:

         while (apr_file_read(file, buffer, &len) != APR_SUCCESS)

which one is better to use?

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

View raw message