xattr_list
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
xattr_list
Референца за `function.xattr-list.php` со подобрена типографија и навигација.
xattr_list
(PECL xattr >= 0.9.0)
xattr_list — Get a list of extended attributes
= NULL
This functions gets a list of names of extended attributes of a file.
Extended attributes have two different namespaces: user and root. The user namespace is available to all users, while the root namespace is available only to users with root privileges. xattr operates on the user namespace by default, but this can be changed with the
flags parameter.
Параметри
filename-
The path of the file.
flags-
Поддржани xattr знаменца XATTR_DONTFOLLOWНе следи симболична врска, туку работи на самата симболична врска. XATTR_ROOTПостави атрибут во коренскиот (доверлив) простор. Потребна е привилегија на корен.
Вратени вредности
This function returns an array with names of extended attributes.
Примери
Example #1 Prints names of all extended attributes of file
<?php
$file = 'some_file';
$root_attributes = xattr_list($file, XATTR_ROOT);
$user_attributes = xattr_list($file);
echo "Root attributes: \n";
foreach ($root_attributes as $attr_name) {
printf("%s\n", $attr_name);
}
echo "\n User attributes: \n";
foreach ($attributes as $attr_name) {
printf("%s\n", $attr_name);
}
?>