]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add description of archive_entry_perm/archive_entry_set_perm and
authorJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Mon, 22 Feb 2010 04:11:58 +0000 (23:11 -0500)
committerJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Mon, 22 Feb 2010 04:11:58 +0000 (23:11 -0500)
the interaction with archive_entry_set_mode. Move the description of
the latter to archive_entry_stat.3, where archive_entry_filetype and co
are.

SVN-Revision: 1959

libarchive/archive_entry_perms.3
libarchive/archive_entry_stat.3

index 31f5268170f54462f6a040b8536abf3a10a37e86..d0b72406659ca6d83e92b3870418f1a444c6f9e9 100644 (file)
@@ -31,8 +31,8 @@
 .Nm archive_entry_set_gid ,
 .Nm archive_entry_uid ,
 .Nm archive_entry_set_uid ,
-.Nm archive_entry_mode ,
-.Nm archive_entry_set_mode ,
+.Nm archive_entry_perm ,
+.Nm archive_entry_set_perm ,
 .Nm archive_entry_strmode ,
 .Nm archive_entry_uname
 .Nm archive_entry_uname_w
@@ -63,9 +63,9 @@
 .Ft void
 .Fn archive_entry_set_uid "struct archive_entry *a" "uid_t uid"
 .Ft mode_t
-.Fn archive_entry_mode "struct archive_entry *a"
+.Fn archive_entry_perm "struct archive_entry *a"
 .Ft void
-.Fn archive_entry_set_mode "struct archive_entry *a" "mode_t mode"
+.Fn archive_entry_set_perm "struct archive_entry *a" "mode_t mode"
 .Ft const char *
 .Fn archive_entry_strmode "struct archive_entry *a"
 .Ft const char *
@@ -116,17 +116,19 @@ The functions
 .Fn archive_entry_uid ,
 .Fn archive_entry_gid ,
 and
-.Fn archive_entry_mode
-can be used to extract the user id, group id and mode from the given entry.
+.Fn archive_entry_perm
+can be used to extract the user id, group id and permission from the given entry.
 The corresponding functions
 .Fn archive_entry_set_uid ,
 .Fn archive_entry_set_gid ,
 and
-.Fn archive_entry_set_mode
-store the given user id, group id and mode in the entry.
+.Fn archive_entry_set_perm
+store the given user id, group id and permission in the entry.
+The permission is also set as side effect of calling
+.Fn archive_entry_set_mode .
 .Pp
 .Fn archive_entry_strmode
-returns a string representation of the mode as used by the long mode of
+returns a string representation of the permission as used by the long mode of
 .Xr ls 1 .
 .Ss User and group name
 User and group names can be provided in one of three different ways:
index 63d67153fb36ad0f8370f9813dae29593d63e2ea..b43912349576b19eb59aad69ddb660eaef2ddd2c 100644 (file)
@@ -30,6 +30,8 @@
 .Nm archive_entry_copy_stat ,
 .Nm archive_entry_filetype ,
 .Nm archive_entry_set_filetype ,
+.Nm archive_entry_mode ,
+.Nm archive_entry_set_mode ,
 .Nm archive_entry_size ,
 .Nm archive_entry_size_is_set ,
 .Nm archive_entry_set_size ,
 .Fn archive_entry_filetype "struct archive_entry *a"
 .Ft void
 .Fn archive_entry_set_filetype "struct archive_entry *a" "unsigned int type"
+.Ft mode_t
+.Fn archive_entry_mode "struct archive_entry *a"
+.Ft void
+.Fn archive_entry_set_mode "struct archive_entry *a" "mode_t mode"
 .Ft int64_t
 .Fn archive_entry_size "struct archive_entry *a"
 .Ft int
@@ -153,6 +159,21 @@ The constants used by
 .Xr stat 2
 may have different numeric value.
 .Pp
+The functions
+.Fn archive_entry_mode
+and
+.Fn archive_entry_set_mode
+get/set a combination of file type and permissions.
+Use of
+.Fn archive_entry_filetype
+and
+.Fn archive_entry_perm
+for getting and
+.Fn archive_entry_set_filetype
+and
+.Fn archive_entry_set_perm
+for setting is recommented.
+.Pp
 The function
 .Fn archive_entry_size
 returns the file size, if it has been set, and 0 otherwise.