mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add xattr documentation.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166419 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
53e9d1662c
commit
58298041e1
7 changed files with 481 additions and 0 deletions
50
reference/xattr/configure.xml
Normal file
50
reference/xattr/configure.xml
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<section id="xattr.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
xattr is currently available through PECL
|
||||
<ulink url="&url.pecl.package;xattr">&url.pecl.package;xattr</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
If <ulink url="&url.php.pear;">PEAR</ulink> is available on your *nix-like
|
||||
system you can use the pear installer to install the xattr extension, by the
|
||||
following command: <command>pear -v install xattr</command>.
|
||||
</para>
|
||||
<para>
|
||||
You can always download the tar.gz package and install xattr by hand:
|
||||
<example>
|
||||
<title>xattr install by hand</title>
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
gunzip xattr-xxx.tgz
|
||||
tar -xvf xattr-xxx.tar
|
||||
cd xattr-xxx
|
||||
phpize
|
||||
./configure && make && make install
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
70
reference/xattr/constants.xml
Normal file
70
reference/xattr/constants.xml
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<section id="xattr.constants">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>XATTR_ROOT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>XATTR_DONTFOLLOW</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>XATTR_CREATE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>XATTR_REPLACE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
-->
|
75
reference/xattr/functions/xattr-get.xml
Normal file
75
reference/xattr/functions/xattr-get.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.xattr-get">
|
||||
<refnamediv>
|
||||
<refname>xattr_get</refname>
|
||||
<refpurpose>
|
||||
Get an extended attribute.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>xattr_get</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function gets a value of an extended attribute named <parameter>name</parameter>
|
||||
of a file <parameter>path</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
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 <parameter>flags</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Supported xattr flags</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>XATTR_DONTFOLLOW</entry>
|
||||
<entry>Do not follow the symbolic link but operate on symbolic link itself.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_ROOT</entry>
|
||||
<entry>Set attribute in root (trusted) namespace. Requires root privileges.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
Returns <type>string</type> with value or &false; if attribute doesn't exist.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>xattr_set</function>, <function>xattr_remove</function>,
|
||||
<function>xattr_list</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
74
reference/xattr/functions/xattr-list.xml
Normal file
74
reference/xattr/functions/xattr-list.xml
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.xattr-list">
|
||||
<refnamediv>
|
||||
<refname>xattr_list</refname>
|
||||
<refpurpose>
|
||||
Get a list of extended attributes.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>xattr_list</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This functions gets a list of names of extended attributes of a file
|
||||
<parameter>path</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
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 <parameter>flags</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Supported xattr flags</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>XATTR_DONTFOLLOW</entry>
|
||||
<entry>Do not follow the symbolic link but operate on symbolic link itself.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_ROOT</entry>
|
||||
<entry>Set attribute in root (trusted) namespace. Requires root privileges.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
This function returns array with names of extended attributes.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>xattr_get</function>, <function>xattr_set</function>,
|
||||
<function>xattr_remove</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
75
reference/xattr/functions/xattr-remove.xml
Normal file
75
reference/xattr/functions/xattr-remove.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.xattr-remove">
|
||||
<refnamediv>
|
||||
<refname>xattr_remove</refname>
|
||||
<refpurpose>
|
||||
Remove an extended attribute.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>xattr_remove</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function removes an extended attribute named <parameter>name</parameter>
|
||||
of a file <parameter>path</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
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 <parameter>flags</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Supported xattr flags</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>XATTR_DONTFOLLOW</entry>
|
||||
<entry>Do not follow the symbolic link but operate on symbolic link itself.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_ROOT</entry>
|
||||
<entry>Set attribute in root (trusted) namespace. Requires root privileges.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
See also <function>xattr_get</function>, <function>xattr_set</function>,
|
||||
<function>xattr_list</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
87
reference/xattr/functions/xattr-set.xml
Normal file
87
reference/xattr/functions/xattr-set.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.xattr-set">
|
||||
<refnamediv>
|
||||
<refname>xattr_set</refname>
|
||||
<refpurpose>
|
||||
Set an extended attribute.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>xattr_set</methodname>
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function sets value of an extended attribute named <parameter>name</parameter>
|
||||
to <parameter>value</parameter> of a file <parameter>path</parameter>.
|
||||
Extended attribute will be created if it doesn't exist or replaced
|
||||
otherwise. You can change this behaviour by using <parameter>flags</parameter>
|
||||
parameter.
|
||||
</para>
|
||||
<para>
|
||||
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 <parameter>flags</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>Supported xattr flags</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>XATTR_CREATE</entry>
|
||||
<entry>Function will fail if extended attribute already exists.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_REPLACE</entry>
|
||||
<entry>Function will fail if extended attribute doesn't exist.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_DONTFOLLOW</entry>
|
||||
<entry>Do not follow the symbolic link but operate on symbolic link itself.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>XATTR_ROOT</entry>
|
||||
<entry>Set attribute in root (trusted) namespace. Requires root privileges.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<para>
|
||||
See also <function>xattr_get</function>, <function>xattr_remove</function>,
|
||||
<function>xattr_list</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
50
reference/xattr/reference.xml
Normal file
50
reference/xattr/reference.xml
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<reference id="ref.xattr">
|
||||
<title>xattr Functions</title>
|
||||
<titleabbrev>xattr</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section id="xattr.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
xattr extension allows to manipulate extended attributes on filesystems that support them.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="xattr.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
To use xattr, you will need libattr installed, available
|
||||
on the Linux XFS homepage <ulink url="&url.xattr;">&url.xattr;</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
&reference.xattr.configure;
|
||||
&reference.xattr.constants;
|
||||
|
||||
</partintro>
|
||||
&reference.xattr.functions;
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue