1 | <?php |
||
12 | class System implements ISystem { |
||
13 | /** @var (string|bool)[] */ |
||
14 | private $paths = []; |
||
15 | |||
16 | /** |
||
17 | * Get the path to a file descriptor of the current process |
||
18 | * |
||
19 | * @param int $num the file descriptor id |
||
20 | * @return string |
||
21 | * @throws Exception |
||
22 | */ |
||
23 | 1040 | public function getFD($num) { |
|
24 | $folders = [ |
||
25 | 1040 | '/proc/self/fd', |
|
26 | '/dev/fd' |
||
27 | ]; |
||
28 | 1040 | foreach ($folders as $folder) { |
|
29 | 1040 | if (file_exists($folder)) { |
|
30 | 1040 | return $folder . '/' . $num; |
|
31 | } |
||
32 | } |
||
33 | throw new Exception('Cant find file descriptor path'); |
||
34 | } |
||
35 | |||
36 | 1044 | public function getSmbclientPath() { |
|
39 | |||
40 | 1028 | public function getNetPath() { |
|
43 | |||
44 | 1024 | public function getStdBufPath() { |
|
47 | |||
48 | 1028 | public function getDatePath() { |
|
51 | |||
52 | public function libSmbclientAvailable() { |
||
55 | |||
56 | 1044 | protected function getBinaryPath($binary) { |
|
65 | } |
||
66 |