CXLII. xattr Functions

Einführung

The xattr extension allows for the manipulation of extended attributes on a filesystem.

Anforderungen

To use xattr, you will need libattr installed. It is available at http://oss.sgi.com/projects/xfs/.

Anmerkung: These functions only work on filesystems that support extended attributes, and have them enabled at mount time. Some common filesystems that support extended attributes are ext2, ext3, reiserfs, jfs, and xfs.

Installation

xattr is currently available through PECL http://pecl.php.net/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:

Beispiel 1. xattr install by hand

gunzip xattr-xxx.tgz
tar -xvf xattr-xxx.tar
cd xattr-xxx
phpize
./configure && make && make install

Vordefinierte Konstanten

Folgende Konstanten werden von dieser Erweiterung definiert und stehen nur zur Verfügung, wenn die Erweiterung entweder statisch in PHP kompiliert oder dynamisch zur Laufzeit geladen wurde.

XATTR_ROOT (integer)

Set attribute in root (trusted) namespace. Requires root privileges.

XATTR_DONTFOLLOW (integer)

Do not follow the symbolic link but operate on symbolic link itself.

XATTR_CREATE (integer)

Function will fail if extended attribute already exists.

XATTR_REPLACE (integer)

Function will fail if extended attribute doesn't exist.

Inhaltsverzeichnis
xattr_get --  Get an extended attribute
xattr_list --  Get a list of extended attributes
xattr_remove --  Remove an extended attribute
xattr_set --  Set an extended attribute
xattr_supported --  Check if filesystem supports extended attributes

Hosting by: Hurra Communications GmbH
Generated: 2007-01-26 17:57:11