PHP - xattr remove() Function
xattr_remove() function can remove an extended attribute.
Syntax
bool xattr_remove( string $filename , string $name [, int $flags ] )
xattr_remove() function can remove an extended attribute of a file.
The extended attributes have two different namespaces: user and root. The user namespace can be available to all users, while a root namespace is available only to users with root privileges. xattr can operate on a user namespace by default, but we can change it by using the flags argument.
xattr_remove() function can return true on success or false on failure.
Example
<?php
$file = "some_file";
$attributes = xattr_list($file);
foreach($attributes as $attr_name) {
xattr_remove($file, $attr_name);
}
?>
php_function_reference.htm
Advertisements