summaryrefslogtreecommitdiff
path: root/include/apr_file_io.h
diff options
context:
space:
mode:
authorthommay <thommay@13f79535-47bb-0310-9956-ffa450edef68>2003-08-23 10:01:22 +0000
committerthommay <thommay@13f79535-47bb-0310-9956-ffa450edef68>2003-08-23 10:01:22 +0000
commitcb9f439ffcb5e291a0f346c8ccc14a936212df57 (patch)
tree3a179ee16f60114c9088d45880bcf4c5d69962a5 /include/apr_file_io.h
parentff779bd7233b4c58731696c70443b3c8ca9f7fe0 (diff)
downloadlibapr-cb9f439ffcb5e291a0f346c8ccc14a936212df57.tar.gz
Add apr_temp_dir_get(), a function to get the most suitable directory to place
temp files based on environment variables and other factors. Obtained from: C Mike Pilato <cmpilato@collab.net> Reviewed by: Thom May git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64591 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_file_io.h')
-rw-r--r--include/apr_file_io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index 68ad4b1c4..dbc8d422d 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -764,6 +764,22 @@ APR_DECLARE(void) apr_file_unset_inherit(apr_file_t *file);
APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *templ,
apr_int32_t flags, apr_pool_t *p);
+
+/**
+ * Find an existing directory suitable as a temporary storage location.
+ * @param temp_dir The temp directory.
+ * @param p The pool to use for any necessary allocations.
+ * @remark
+ * This function uses an algorithm to search for a directory that an
+ * an application can use for temporary storage. Once such a
+ * directory is found, that location is cached by the library. Thus,
+ * callers only pay the cost of this algorithm once if that one time
+ * is successful.
+ *
+ */
+APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
+ apr_pool_t *p);
+
/** @} */
#ifdef __cplusplus