summaryrefslogtreecommitdiff
path: root/include/apr_file_io.h
diff options
context:
space:
mode:
authorgstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2000-07-03 12:06:38 +0000
committergstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2000-07-03 12:06:38 +0000
commit14384e0c1e1280647c7d26408d05fab41bfa6f46 (patch)
tree47e85b7b21eb1ba24457d620a9a27a925545e78c /include/apr_file_io.h
parent5dd1707e7a337bcc93aa69a297b413f5aa0f973e (diff)
downloadlibapr-14384e0c1e1280647c7d26408d05fab41bfa6f46.tar.gz
add ap_finfo_t.device
add ap_setfileperms() for setting file permissions (chmod cover). - OS/2 and Win32 currently return APR_ENOTIMPL fix the file perm handling in APR: some conversion between ap_fileperms_t and mode_t was not occurring; adding new conversion function; renamed old conversion func. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60292 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_file_io.h')
-rw-r--r--include/apr_file_io.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index de5e6708f..5d24972b9 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -111,6 +111,7 @@ typedef ap_int32_t ap_fileperms_t;
typedef uid_t ap_uid_t;
typedef gid_t ap_gid_t;
typedef ino_t ap_ino_t;
+typedef dev_t ap_dev_t;
struct ap_finfo_t {
ap_fileperms_t protection;
@@ -118,6 +119,7 @@ struct ap_finfo_t {
ap_uid_t user;
ap_gid_t group;
ap_ino_t inode;
+ ap_dev_t device;
ap_off_t size;
ap_time_t atime;
ap_time_t mtime;
@@ -362,7 +364,7 @@ ap_status_t ap_fgets(char *str, int len, ap_file_t *thefile);
B<Put the string into a specified file.>
arg 1) The string to write.
- arg 2) The file descriptor to write to from
+ arg 2) The file descriptor to write to
=cut
*/
@@ -402,10 +404,10 @@ ap_status_t ap_dupfile(ap_file_t **new_file, ap_file_t *old_file, ap_pool_t *p);
=head1 ap_status_t ap_getfileinfo(ap_finfo_t *finfo, ap_file_t *thefile)
-B<get the specified file's stats..>
+B<get the specified file's stats.>
arg 1) Where to store the information about the file.
- arg 2) The file to get information about.
+ arg 2) The file to get information about.
=cut
*/
@@ -413,6 +415,24 @@ ap_status_t ap_getfileinfo(ap_finfo_t *finfo, ap_file_t *thefile);
/*
+=head1 ap_status_t ap_setfileperms(const char *fname, ap_fileperms_t perms)
+
+B<set the specified file's permission bits.>
+
+ arg 1) The file (name) to apply the permissions to.
+ arg 2) The permission bits to apply to the file.
+
+ Some platforms may not be able to apply all of the available permission
+ bits; APR_INCOMPLETE will be returned if some permissions are specified
+ which could not be set.
+
+ Platforms which do not implement this feature will return APR_ENOTIMPL.
+=cut
+ */
+ap_status_t ap_setfileperms(const char *fname, ap_fileperms_t perms);
+
+/*
+
=head1 ap_status_t ap_stat(ap_finfo_t *finfo, const char *fname, ap_pool_t *cont)
B<get the specified file's stats. The file is specified by filename, instead of using a pre-opened file.>