apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Moore-Oliva <j...@chatgris.com>
Subject apr_file_seek
Date Mon, 02 Sep 2002 21:19:06 GMT
I have noticed that the of apr_file_seek uses apr_file_flush in the
setptr argument.  I have an operation that only writes to a buffered
file, and yes I must change file position while doing a write only
operation, and the file_flush consumes a lot of time.

In the following source code, could anyone foresee a reason why I could
not create my own function by removing the following lines for a write
only operation?

As far as I understand, a flush is only required if you are seeking to
read data.

    if (thefile->direction == 1) {
        thefile->bufpos = thefile->direction = thefile->dataRead = 0;


View raw message