From 58298041e163cf20bbb48436f3837f378c8e9548 Mon Sep 17 00:00:00 2001 From: Marcin Gibula Date: Sat, 14 Aug 2004 23:39:49 +0000 Subject: [PATCH] Add xattr documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166419 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/xattr/configure.xml | 50 +++++++++++++ reference/xattr/constants.xml | 70 +++++++++++++++++ reference/xattr/functions/xattr-get.xml | 75 +++++++++++++++++++ reference/xattr/functions/xattr-list.xml | 74 ++++++++++++++++++ reference/xattr/functions/xattr-remove.xml | 75 +++++++++++++++++++ reference/xattr/functions/xattr-set.xml | 87 ++++++++++++++++++++++ reference/xattr/reference.xml | 50 +++++++++++++ 7 files changed, 481 insertions(+) create mode 100644 reference/xattr/configure.xml create mode 100644 reference/xattr/constants.xml create mode 100644 reference/xattr/functions/xattr-get.xml create mode 100644 reference/xattr/functions/xattr-list.xml create mode 100644 reference/xattr/functions/xattr-remove.xml create mode 100644 reference/xattr/functions/xattr-set.xml create mode 100644 reference/xattr/reference.xml diff --git a/reference/xattr/configure.xml b/reference/xattr/configure.xml new file mode 100644 index 0000000000..ea4ff8df40 --- /dev/null +++ b/reference/xattr/configure.xml @@ -0,0 +1,50 @@ + + +
+ &reftitle.install; + + xattr is currently available through PECL + &url.pecl.package;xattr. + + + If PEAR is available on your *nix-like + system you can use the pear installer to install the xattr extension, by the + following command: pear -v install xattr. + + + You can always download the tar.gz package and install xattr by hand: + + xattr install by hand + + + + + +
+ + diff --git a/reference/xattr/constants.xml b/reference/xattr/constants.xml new file mode 100644 index 0000000000..6315fe9b1e --- /dev/null +++ b/reference/xattr/constants.xml @@ -0,0 +1,70 @@ + + +
+ &reftitle.constants; + &extension.constants; + + + + XATTR_ROOT + (integer) + + + + + + + + + + XATTR_DONTFOLLOW + (integer) + + + + + + + + + + XATTR_CREATE + (integer) + + + + + + + + + + XATTR_REPLACE + (integer) + + + + + + + + +
+ + diff --git a/reference/xattr/functions/xattr-get.xml b/reference/xattr/functions/xattr-get.xml new file mode 100644 index 0000000000..e20c3d1c62 --- /dev/null +++ b/reference/xattr/functions/xattr-get.xml @@ -0,0 +1,75 @@ + + + + + + xattr_get + + Get an extended attribute. + + + + Description + + stringxattr_get + stringpath + stringname + intflags + + + This function gets a value of an extended attribute named name + of a file path. + + + Extended attributes have two different namespaces: user and root namespace. + User namespace is available for all users while root namespace is available + only for user with root privileges. xattr operates on user namespace by default, + but you can change that using flags argument. + + + + Supported xattr flags + + + + XATTR_DONTFOLLOW + Do not follow the symbolic link but operate on symbolic link itself. + + + XATTR_ROOT + Set attribute in root (trusted) namespace. Requires root privileges. + + + +
+
+ + Returns string with value or &false; if attribute doesn't exist. + + + See also xattr_set, xattr_remove, + xattr_list. + +
+
+ + diff --git a/reference/xattr/functions/xattr-list.xml b/reference/xattr/functions/xattr-list.xml new file mode 100644 index 0000000000..278f4ffd32 --- /dev/null +++ b/reference/xattr/functions/xattr-list.xml @@ -0,0 +1,74 @@ + + + + + + xattr_list + + Get a list of extended attributes. + + + + Description + + arrayxattr_list + stringpath + intflags + + + This functions gets a list of names of extended attributes of a file + path. + + + Extended attributes have two different namespaces: user and root namespace. + User namespace is available for all users while root namespace is available + only for user with root privileges. xattr operates on user namespace by default, + but you can change that using flags argument. + + + + Supported xattr flags + + + + XATTR_DONTFOLLOW + Do not follow the symbolic link but operate on symbolic link itself. + + + XATTR_ROOT + Set attribute in root (trusted) namespace. Requires root privileges. + + + +
+
+ + This function returns array with names of extended attributes. + + + See also xattr_get, xattr_set, + xattr_remove. + +
+
+ + diff --git a/reference/xattr/functions/xattr-remove.xml b/reference/xattr/functions/xattr-remove.xml new file mode 100644 index 0000000000..569f11bd94 --- /dev/null +++ b/reference/xattr/functions/xattr-remove.xml @@ -0,0 +1,75 @@ + + + + + + xattr_remove + + Remove an extended attribute. + + + + Description + + boolxattr_remove + stringpath + stringname + intflags + + + This function removes an extended attribute named name + of a file path. + + + Extended attributes have two different namespaces: user and root namespace. + User namespace is available for all users while root namespace is available + only for user with root privileges. xattr operates on user namespace by default, + but you can change that using flags argument. + + + + Supported xattr flags + + + + XATTR_DONTFOLLOW + Do not follow the symbolic link but operate on symbolic link itself. + + + XATTR_ROOT + Set attribute in root (trusted) namespace. Requires root privileges. + + + +
+
+ + &return.success; + + + See also xattr_get, xattr_set, + xattr_list. + +
+
+ + diff --git a/reference/xattr/functions/xattr-set.xml b/reference/xattr/functions/xattr-set.xml new file mode 100644 index 0000000000..d0eec6e58f --- /dev/null +++ b/reference/xattr/functions/xattr-set.xml @@ -0,0 +1,87 @@ + + + + + + xattr_set + + Set an extended attribute. + + + + Description + + boolxattr_set + stringpath + stringname + stringvalue + intflags + + + This function sets value of an extended attribute named name + to value of a file path. + Extended attribute will be created if it doesn't exist or replaced + otherwise. You can change this behaviour by using flags + parameter. + + + Extended attributes have two different namespaces: user and root namespace. + User namespace is available for all users while root namespace is available + only for user with root privileges. xattr operates on user namespace by default, + but you can change that using flags argument. + + + + Supported xattr flags + + + + XATTR_CREATE + Function will fail if extended attribute already exists. + + + XATTR_REPLACE + Function will fail if extended attribute doesn't exist. + + + XATTR_DONTFOLLOW + Do not follow the symbolic link but operate on symbolic link itself. + + + XATTR_ROOT + Set attribute in root (trusted) namespace. Requires root privileges. + + + +
+
+ + &return.success; + + + See also xattr_get, xattr_remove, + xattr_list. + +
+
+ + diff --git a/reference/xattr/reference.xml b/reference/xattr/reference.xml new file mode 100644 index 0000000000..387c940673 --- /dev/null +++ b/reference/xattr/reference.xml @@ -0,0 +1,50 @@ + + + + + xattr Functions + xattr + + +
+ &reftitle.intro; + + xattr extension allows to manipulate extended attributes on filesystems that support them. + +
+ +
+ &reftitle.required; + + To use xattr, you will need libattr installed, available + on the Linux XFS homepage &url.xattr;. + +
+ + &reference.xattr.configure; + &reference.xattr.constants; + +
+ &reference.xattr.functions; +
+ +