blob: 80449b2744bb6f79eeaf3b458458891c41f129fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Robin Appelman <robin@icewind.nl>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files_External\Lib\Storage;
use Icewind\SMB\System;
use OCP\IBinaryFinder;
/**
* Bridge the NC and SMB binary finding logic
*/
class SystemBridge extends System {
public function __construct(
private IBinaryFinder $binaryFinder,
) {
}
protected function getBinaryPath(string $binary): ?string {
$path = $this->binaryFinder->findBinaryPath($binary);
return $path !== false ? $path : null;
}
}
|