| @@ 438-450 (lines=13) @@ | ||
| 435 | } |
|
| 436 | } |
|
| 437 | ||
| 438 | public function touch($path, $time = null) { |
|
| 439 | try { |
|
| 440 | if (!$this->file_exists($path)) { |
|
| 441 | $fh = $this->share->write($this->buildPath($path)); |
|
| 442 | fclose($fh); |
|
| 443 | return true; |
|
| 444 | } |
|
| 445 | return false; |
|
| 446 | } catch (ConnectException $e) { |
|
| 447 | \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating file']); |
|
| 448 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 449 | } |
|
| 450 | } |
|
| 451 | ||
| 452 | public function opendir($path) { |
|
| 453 | try { |
|
| @@ 477-488 (lines=12) @@ | ||
| 474 | } |
|
| 475 | } |
|
| 476 | ||
| 477 | public function mkdir($path) { |
|
| 478 | $path = $this->buildPath($path); |
|
| 479 | try { |
|
| 480 | $this->share->mkdir($path); |
|
| 481 | return true; |
|
| 482 | } catch (ConnectException $e) { |
|
| 483 | \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating folder']); |
|
| 484 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 485 | } catch (Exception $e) { |
|
| 486 | return false; |
|
| 487 | } |
|
| 488 | } |
|
| 489 | ||
| 490 | public function file_exists($path) { |
|
| 491 | try { |
|