diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-03-21 21:05:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 21:05:57 +0100 |
commit | 9e9b014e3169fd7f34ecf45dc5a379309d0843af (patch) | |
tree | 0f19f3ddaa6966fff7c1297ea937b00c485417c6 /apps/files_external/3rdparty/icewind/smb/src/System.php | |
parent | fac3c1d278624c6c326e193e89db2f805750eda3 (diff) | |
parent | 66781e74ada3fd22bb5b246a59897ac146cda4dd (diff) | |
download | nextcloud-server-9e9b014e3169fd7f34ecf45dc5a379309d0843af.tar.gz nextcloud-server-9e9b014e3169fd7f34ecf45dc5a379309d0843af.zip |
Merge pull request #26046 from nextcloud/smb-3.4.0
update icewind/smb to 3.4.0
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/System.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/System.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/System.php b/apps/files_external/3rdparty/icewind/smb/src/System.php index 0e41ee032d6..919907477ab 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/System.php +++ b/apps/files_external/3rdparty/icewind/smb/src/System.php @@ -10,7 +10,7 @@ namespace Icewind\SMB; use Icewind\SMB\Exception\Exception; class System implements ISystem { - /** @var (string|bool)[] */ + /** @var (string|null)[] */ private $paths = []; /** @@ -20,7 +20,7 @@ class System implements ISystem { * @return string * @throws Exception */ - public function getFD($num) { + public function getFD(int $num): string { $folders = [ '/proc/self/fd', '/dev/fd' @@ -33,36 +33,36 @@ class System implements ISystem { throw new Exception('Cant find file descriptor path'); } - public function getSmbclientPath() { + public function getSmbclientPath(): ?string { return $this->getBinaryPath('smbclient'); } - public function getNetPath() { + public function getNetPath(): ?string { return $this->getBinaryPath('net'); } - public function getSmbcAclsPath() { + public function getSmbcAclsPath(): ?string { return $this->getBinaryPath('smbcacls'); } - public function getStdBufPath() { + public function getStdBufPath(): ?string { return $this->getBinaryPath('stdbuf'); } - public function getDatePath() { + public function getDatePath(): ?string { return $this->getBinaryPath('date'); } - public function libSmbclientAvailable() { + public function libSmbclientAvailable(): bool { return function_exists('smbclient_state_new'); } - protected function getBinaryPath($binary) { + protected function getBinaryPath(string $binary): ?string { if (!isset($this->paths[$binary])) { $result = null; $output = []; exec("which $binary 2>&1", $output, $result); - $this->paths[$binary] = $result === 0 ? trim(implode('', $output)) : false; + $this->paths[$binary] = $result === 0 ? trim(implode('', $output)) : null; } return $this->paths[$binary]; } |