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: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Juan Rivera" <[EMAIL PROTECTED]>; "Kevin Pilch-Bisson"
<[EMAIL PROTECTED]>; "Thom May" <[EMAIL PROTECTED]>; "APR Dev
List" <[email protected]>
Sent: Wednesday, December 04, 2002 9:03 PM
Subject: Re: APR_TMP_DIRECTORY


>
>
> On 4 Dec 2002 [EMAIL PROTECTED] wrote:
>
> > Juan Rivera <[EMAIL PROTECTED]> 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
>
>

Reply via email to