httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Small direction change for APR's file I/O routines.
Date Tue, 04 Jan 2000 21:06:07 GMT

The more I get involved in making the current changes for ap_stat and
ap_getfileinfo, the less I like them.  I want to change them completely,
but I need the groups reaction first.

Currently, we store basically what accounts to all of the fields from the
unix stat structure in the ap_file_t instance.  This makes those fields
unavailable to programs that want access to individual fields.  For
example, a programmer cannot get to the uid field of a file directly, they
have to call a function to get that data.

I am thinking of redefining the stat structure within APR, and just having
ap_stat and ap_get_fileinfo fill out a public structure.  There is really
no reason for this information to be in an incomplete type.  Any field
that does not have a good implementation on a platform, could just have an
error condition.  For example, if the uid field didn't map well to
Windows, we could just leave that field with a -999 in it, which would be

I think this cleans up the code a lot and reduces the number of functions
that we would need to call.  I have had a couple of people suggest this in
the past, but I have been hesitant.  Seeing how we are using stat info, I
think this is the correct direction to take.  This will also make a stat
cache easier to add if APR decides it is necessary later on.  :-)

If I don't hear from anybody, I am going to start this work relatively


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

View raw message