apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: [PATCH] Win32: Why explicitly futz with the file pointer?
Date Sun, 20 Oct 2002 20:01:29 GMT
On Sun, 20 Oct 2002, Aaron Bannert wrote:

> On Sun, Oct 20, 2002 at 11:30:35AM -0400, Jeff Trawick wrote:
> > Maybe APR_APPEND needs to be cheap/simple append a la stdio append: we
> > seek to the end of the file at open time and forget about it after
> > that.

APR_APPEND should always remain what it is right now.  Namely, "Always
write to the end of the file".  There are a couple of reasons for
that.  1)  That is the POSIX definition of append, which is why APR_APPEND
was chosen.  This removes obstacles to writing APR code.  2)  It is what
the current code that uses APR expects.

As for creating a new flag that opens a file and seeks to the end, do we
really need that?  I would much rather suggest to programmers who want
that functionality to write the following code:

apr_file_seek(fd, 0, APR_FILE_END);

I don't like continuing to add flags to functions.  It makes the API
harder to grasp quickly.


Ryan Bloom                        	rbb@apache.org
550 Jean St
Oakland CA 94610

View raw message