From dev-return-8581-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Dec 05 06:53:58 2002 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 69426 invoked by uid 500); 5 Dec 2002 06:53:58 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 69415 invoked from network); 5 Dec 2002 06:53:57 -0000 Message-ID: <001c01c29c2a$f4c313e0$7500a8c0@goliath> From: "David Reid" To: "APR Dev List" References: Subject: Re: APR_TMP_DIRECTORY Date: Thu, 5 Dec 2002 06:53:02 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: To: Cc: "Juan Rivera" ; "Kevin Pilch-Bisson" ; "Thom May" ; "APR Dev List" Sent: Wednesday, December 04, 2002 9:03 PM Subject: Re: APR_TMP_DIRECTORY > > > On 4 Dec 2002 cmpilato@collab.net wrote: > > > Juan Rivera 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 > >