This commit is contained in:
Juan Pablo Villafañez 2017-04-24 13:58:34 +00:00 committed by GitHub
commit 9fd949aa47

View file

@ -302,4 +302,33 @@ class NativeShare extends AbstractShare {
public function __destruct() { public function __destruct() {
unset($this->state); unset($this->state);
} }
/**
* List the available extended attributes for the path (returns a fixed list)
*
* @param string $path
* @return array list the available attributes for the path
*/
public function listxattr($path) {
$this->connect();
self::registerErrorHandler();
$result = smbclient_listxattr($this->state, $this->buildUrl($path));
self::restoreErrorHandler();
return $result;
}
/**
* Get extended attributes for the path
*
* @param string $path
* @param string $attr attribute to get the info
* @return string the attribute value
*/
public function getxattr($path, $attr) {
$this->connect();
self::registerErrorHandler();
$result = smbclient_getxattr($this->state, $this->buildUrl($path), $attr);
self::restoreErrorHandler();
return $result;
}
} }