apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: APR_TMP_DIRECTORY
Date Thu, 05 Dec 2002 06:53:02 GMT
Actually I think we should have 3 new functions...

char *apr_temp_get_directory(apr_pool_t *)
char *apr_temp_get_filename(char *dir, char *suffix, apr_pool_t *)
char *apr_temp_get_unique(char *suffix, apr_pool_t *)

This gives us the ability to let the users do what they like and maximum
flexability. apr_get_unique is mean to work along the lines of PHP's
uniqid(), though do we also want to allow for extensions to be passed?

david

----- Original Message -----
From: <rbb@apache.org>
To: <cmpilato@collab.net>
Cc: "Juan Rivera" <Juan.Rivera@citrix.com>; "Kevin Pilch-Bisson"
<kevin@pilch-bisson.net>; "Thom May" <thom@planetarytramp.net>; "APR Dev
List" <dev@apr.apache.org>
Sent: Wednesday, December 04, 2002 9:03 PM
Subject: Re: APR_TMP_DIRECTORY


>
>
> On 4 Dec 2002 cmpilato@collab.net wrote:
>
> > Juan Rivera <Juan.Rivera@citrix.com> writes:
> >
> > > Along those lines would be the ability to generate a unique temporary
file
> > > name. Windows provides that functionality. I think it can be very
handy.
> >
> > Subversion has a custom routine for doing that, too.  You specify a
> > prefix path (like "/tmp/svn-commit") and a suffix (like "tmp") and the
> > result looks like "/tmp/svn-commit.12345.00000.tmp", where 12345 is, I
> > think, some pointer value, and 00000 is a monotonically increasing
> > trail-and-error countery thing.
> >
> > Be great if APR grew such a routine, too.
>
> This would be simple to add, because we already have this feature
> internally.  The only thing we would have to do, is expose it through an
> API.
>
> Ryan
>
>


Mime
View raw message