You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Wilfredo Sánchez <ws...@wsanchez.net> on 2002/12/08 23:13:54 UTC

Suggested API (Re: APR_TMP_DIRECTORY)

   So I'm clear, here's what I suggest.  Two new functions, one existing:

// Returns a valid scratch dir (system-defined, eg /tmp)
apr_status_t apr_file_get_temp_directory(char** path, apr_pool_t *p);

// Creates new file with a template, returns handle
// (This already exists in apr_file_io.h)
// (Should this take an apr_fileperms_t for flags?)
apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ, apr_int32_t 
flags, apr_pool_t *p);

// Creates new directory with a template, returns handle
apr_status_t apr_dir_mktemp(char **path, char *templ, apr_fileperms_t 
perm, apr_pool_t *p);

/* no apr_temp_get_unique */

	-wsv


Re: Suggested API (Re: APR_TMP_DIRECTORY)

Posted by Wilfredo Sánchez <ws...@wsanchez.net>.
   Seriously?

   I must be completely in la la land, because I can't see how.  It's 
adding a function that's the same as the existing apr_file_mktemp(), 
except it makes a directory instead.  Add one more to return the system 
temp directory.  What am I missing?  If that's overengineered, then so 
is apr_file_mktemp().

   Am I crazy?  I'll shut up if I'm crazy.

	-wsv

On Sunday, December 8, 2002, at 02:38  PM, David Reid wrote:

> How did we get from something very simple to this??? Fred, if you 
> really
> want to implement this then feel free, but this is a long wqay from 
> what is
> needed IMHO and smacks of overengineering :( .


Re: Suggested API (Re: APR_TMP_DIRECTORY)

Posted by David Reid <dr...@jetnet.co.uk>.
Damn, I could have sworn this was an apr list!

How did we get from something very simple to this??? Fred, if you really
want to implement this then feel free, but this is a long wqay from what is
needed IMHO and smacks of overengineering :( .

david

>    So I'm clear, here's what I suggest.  Two new functions, one existing:
>
> // Returns a valid scratch dir (system-defined, eg /tmp)
> apr_status_t apr_file_get_temp_directory(char** path, apr_pool_t *p);
>
> // Creates new file with a template, returns handle
> // (This already exists in apr_file_io.h)
> // (Should this take an apr_fileperms_t for flags?)
> apr_status_t apr_file_mktemp(apr_file_t **fp, char *templ, apr_int32_t
> flags, apr_pool_t *p);
>
> // Creates new directory with a template, returns handle
> apr_status_t apr_dir_mktemp(char **path, char *templ, apr_fileperms_t
> perm, apr_pool_t *p);
>
> /* no apr_temp_get_unique */