mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
remove unused code
This commit is contained in:
parent
00f74274a3
commit
f444b7c138
2 changed files with 0 additions and 69 deletions
|
|
@ -312,20 +312,6 @@ class NativeShare implements IShare {
|
|||
return NativeStream::wrap($this->state, $handle, 'w');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 listAttributes($path) {
|
||||
$this->connect();
|
||||
self::registerErrorHandler();
|
||||
$result = smbclient_listxattr($this->state, $this->buildUrl($path));
|
||||
self::restoreErrorHandler();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extended attributes for the path
|
||||
*
|
||||
|
|
|
|||
|
|
@ -271,35 +271,6 @@ class Share implements IShare {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @return array
|
||||
*/
|
||||
protected function getAttributes($path) {
|
||||
$path = $this->escapePath($path);
|
||||
$output = $this->execute('allinfo ' . $path);
|
||||
$attributes = array();
|
||||
foreach ($output as $line) {
|
||||
list($name, $value) = explode($line, ':', 2);
|
||||
$value = trim($value);
|
||||
switch ($name) {
|
||||
case 'create_time':
|
||||
$attributes['system.dos_attr.c_time'] = strtotime($value . ' ' . $this->getServerTimeZone());
|
||||
break;
|
||||
case 'access_time':
|
||||
$attributes['system.dos_attr.a_time'] = strtotime($value . ' ' . $this->getServerTimeZone());
|
||||
break;
|
||||
case 'change_time':
|
||||
$attributes['system.dos_attr.m_time'] = strtotime($value . ' ' . $this->getServerTimeZone());
|
||||
break;
|
||||
case 'attributes':
|
||||
$attributes['system.dos_attr.mode'] = $this->parseMode($value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $mode
|
||||
* @return string
|
||||
|
|
@ -321,32 +292,6 @@ class Share implements IShare {
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 listAttributes($path) {
|
||||
return array_keys($this->getAttributes($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extended attributes for the path
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $attribute attribute to get the info
|
||||
* @return string the attribute value
|
||||
*/
|
||||
public function getAttribute($path, $attribute) {
|
||||
$attributes = $this->getAttributes($path);
|
||||
if (isset($attributes[$attribute])) {
|
||||
return $attributes[$attribute];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $command
|
||||
* @return array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue