summaryrefslogtreecommitdiff
path: root/include/apr_file_io.h
diff options
context:
space:
mode:
authorpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2010-02-03 10:17:57 +0000
committerpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2010-02-03 10:17:57 +0000
commit310b40dddf576dc8780e8f6e185655bde9c4447a (patch)
tree3970e97c1199b79227fc0004d3dfcfd20834258c /include/apr_file_io.h
parente78be9b18f3880115874e03234e2994c3c0e118c (diff)
downloadlibapr-310b40dddf576dc8780e8f6e185655bde9c4447a.tar.gz
Add two new features to APR Files:
- When opened with normal rotating flag, every 60 seconds the file will check if the file it is writing to has changed inode (ie, been replaced/moved). - When opened with the manual rotating flag, the consumer must call the check, but can provider the current timestamp, to avoid a apr_time call. This is based off of the patch from Brian, but I've modified it for style, and adding the manual rotation flag after discussion with brian at the httpd hackathon. Submitted by: Brian J. France <brian brianfrance.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@905970 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_file_io.h')
-rw-r--r--include/apr_file_io.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index 80d9fbe7a..1c80a6277 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -75,12 +75,18 @@ extern "C" {
file should support
apr_socket_sendfile operation */
#define APR_FOPEN_LARGEFILE 0x04000 /**< Platform dependent flag to enable
- * large file support, see WARNING below
+ * large file support, see WARNING below
*/
+
#define APR_FOPEN_SPARSE 0x08000 /**< Platform dependent flag to enable
* sparse file support, see WARNING below
*/
+#define APR_FOPEN_ROTATING 0x10000 /**< Do file file rotation checking */
+
+#define APR_FOPEN_MANUAL_ROTATE 0x20000 /**< Enable Manual rotation */
+
+
/* backcompat */
#define APR_READ APR_FOPEN_READ /**< @deprecated @see APR_FOPEN_READ */
#define APR_WRITE APR_FOPEN_WRITE /**< @deprecated @see APR_FOPEN_WRITE */
@@ -935,8 +941,13 @@ APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *templ,
APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
apr_pool_t *p);
+
+APR_DECLARE(apr_status_t) apr_file_rotating_check(apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_rotating_manual_check(apr_file_t *thefile, apr_time_t time);
+
/** @} */
+
#ifdef __cplusplus
}
#endif