summaryrefslogtreecommitdiff
path: root/include/apr_file_info.h
diff options
context:
space:
mode:
authorGreg Stein <gstein@apache.org>2002-02-01 01:40:38 +0000
committerGreg Stein <gstein@apache.org>2002-02-01 01:40:38 +0000
commit8af0b9f818c69e42a315fc62eacc90b345658aa8 (patch)
treef25c79fa18b20598e12caa788118dc937c9de450 /include/apr_file_info.h
parentccce29fdbef34738d3bae467e8fc3f0c74236243 (diff)
downloadapr-8af0b9f818c69e42a315fc62eacc90b345658aa8.tar.gz
Add apr_file_copy() and apr_file_append() functions. These are written
in terms of APR itself, so each platform just uses the one function. A future improvement would use CopyFile(Ex) on Windows and sendfile() on sendfile-capable systems. Also add apr_file_attrs_set() for setting file attributes in a logical fashion, rather than based on (Posix) permission bits. This is not (yet) implemented for Windows, and still needs a way to turn *off* the readonly and executable modes. Submitted by: Philip Martin <philip@codematters.co.uk> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62886 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_file_info.h')
-rw-r--r--include/apr_file_info.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/apr_file_info.h b/include/apr_file_info.h
index f057b7013..ed6924bea 100644
--- a/include/apr_file_info.h
+++ b/include/apr_file_info.h
@@ -94,21 +94,26 @@ typedef enum {
* @{
*/
-#define APR_UREAD 0x400 /**< Read by user */
-#define APR_UWRITE 0x200 /**< Write by user */
-#define APR_UEXECUTE 0x100 /**< Execute by user */
+#define APR_UREAD 0x4000 /**< Read by user */
+#define APR_UWRITE 0x2000 /**< Write by user */
+#define APR_UEXECUTE 0x1000 /**< Execute by user */
-#define APR_GREAD 0x040 /**< Read by group */
-#define APR_GWRITE 0x020 /**< Write by group */
-#define APR_GEXECUTE 0x010 /**< Execute by group */
+#define APR_GREAD 0x0040 /**< Read by group */
+#define APR_GWRITE 0x0020 /**< Write by group */
+#define APR_GEXECUTE 0x0010 /**< Execute by group */
-#define APR_WREAD 0x004 /**< Read by others */
-#define APR_WWRITE 0x002 /**< Write by others */
-#define APR_WEXECUTE 0x001 /**< Execute by others */
+#define APR_WREAD 0x0004 /**< Read by others */
+#define APR_WWRITE 0x0002 /**< Write by others */
+#define APR_WEXECUTE 0x0001 /**< Execute by others */
+
+#define APR_OS_DEFAULT 0x0FFF /**< use OS's default permissions */
+
+/* additional permission flags for apr_file_copy and apr_file_append */
+#define APR_FILE_SOURCE_PERMS 0x1000 /**< Copy source file's permissions */
-#define APR_OS_DEFAULT 0xFFF /**< use default permissions of Underlying Operating System*/
/** @} */
+
/**
* Structure for referencing directories.
* @defvar apr_dir_t