xattr_supported

(no version information, might be only in CVS)

xattr_supported --  Check if filesystem supports extended attributes

Description

bool xattr_supported ( string path [, int flags])

This functions checks if filesystem holding file path supports extended attributes. Read access to file path is required.

This function returns TRUE if filesystem supports extended attributes, FALSE if it doesn't and NULL if it can't be determined (for example wrong path or lack of permissions to file).

Example 1. xattr_supported() example

The following code checks if we can use extended attributes.

<?php
$file
= 'some_file';

if (
xattr_supported($file)) {
    
/* ... make use of some xattr_* functions ... */
}

?>

See also xattr_get(), xattr_set(), xattr_remove(), xattr_list().