| @@ 389-400 (lines=12) @@ | ||
| 386 | } |
|
| 387 | } |
|
| 388 | ||
| 389 | public function touch($path, $time = null) { |
|
| 390 | try { |
|
| 391 | if (!$this->file_exists($path)) { |
|
| 392 | $fh = $this->share->write($this->buildPath($path)); |
|
| 393 | fclose($fh); |
|
| 394 | return true; |
|
| 395 | } |
|
| 396 | return false; |
|
| 397 | } catch (ConnectException $e) { |
|
| 398 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 399 | } |
|
| 400 | } |
|
| 401 | ||
| 402 | public function opendir($path) { |
|
| 403 | try { |
|
| @@ 427-437 (lines=11) @@ | ||
| 424 | } |
|
| 425 | } |
|
| 426 | ||
| 427 | public function mkdir($path) { |
|
| 428 | $path = $this->buildPath($path); |
|
| 429 | try { |
|
| 430 | $this->share->mkdir($path); |
|
| 431 | return true; |
|
| 432 | } catch (ConnectException $e) { |
|
| 433 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 434 | } catch (Exception $e) { |
|
| 435 | return false; |
|
| 436 | } |
|
| 437 | } |
|
| 438 | ||
| 439 | public function file_exists($path) { |
|
| 440 | try { |
|