apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] Adding an apr_utime() function
Date Thu, 21 Mar 2002 19:56:26 GMT
When I suggested this would polute the API --- I'm just suggesting
that we deal with atime, mtime, ctime and createtime all at once,
and make sure the fn names work.

I think a call like apr_file_time_set() or something that passes which
metric and it's new value would allow us to have an extensible method
which can react to different platforms.

At 12:26 PM 3/21/2002, Robert Simonson wrote:
>Finally got to this.  Sorry for the delay...
>My case is a proxy cache implementation that we have here.  We want the
>ability to reset the mtime and atime when doing a cache maintenance so that
>when the proxy code is run, it has an accurate mtime/atime.  We don't care
>about ctime.  In fact, we can't change ctime anyway.
>As for polluting the API, I'm not sure how it does.  If this type of
>function is implemented for Unix platforms, can't the other platforms
>simply return APR_ENOTIMPL?  And as for not passing a structure (as was in
>my original patch), why not?  It doesn't seem to be much different than
>defining apr_stat_t or some other apr_*  structure abstraction.
>Rob Simonson
>----- Forwarded by Robert Simonson/Rochester/IBM on 03/21/2002 12:15 PM
>"William A. Rowe, Jr." <wrowe@rowe-clan.net> writes:
> > Before anyone even _considers_ polluting the API [which would
> > raise an instant veto from me] we have to finally address the create
> > time issue on non-Unix.  Then we can get such a patch committed
> > to fit this resolution of this issue..
> >
> > Unix has ctime, mtime and atime.  How often will we change all three
> > at once, or do we want to change a single requested time-at-a-time?
>That is a key question.  I wish I knew the answer :)  Rob, what is
>your use case by the way?  Not that it is the answer for everybody,
>but I'm curious.
>The change-one-time per call handles your issues nicely.  It might be
>nice to have a flag that says to just set everything to the one time
>so that we don't waste a syscall trying to preserve the times we don't
>think we're supposed to modify.
>Jeff Trawick | trawick@attglobal.net
>Born in Roswell... married an alien...

View raw message