You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Joshua Moore-Oliva <jo...@chatgris.com> on 2002/09/02 23:19:06 UTC

apr_file_seek

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) {
        apr_file_flush(thefile);
        thefile->bufpos = thefile->direction = thefile->dataRead = 0;
    }

Josh.