| @@ 431-443 (lines=13) @@ | ||
| 428 | } |
|
| 429 | } |
|
| 430 | ||
| 431 | public function touch($path, $time = null) { |
|
| 432 | try { |
|
| 433 | if (!$this->file_exists($path)) { |
|
| 434 | $fh = $this->share->write($this->buildPath($path)); |
|
| 435 | fclose($fh); |
|
| 436 | return true; |
|
| 437 | } |
|
| 438 | return false; |
|
| 439 | } catch (ConnectException $e) { |
|
| 440 | \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating file']); |
|
| 441 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 442 | } |
|
| 443 | } |
|
| 444 | ||
| 445 | public function opendir($path) { |
|
| 446 | try { |
|
| @@ 470-481 (lines=12) @@ | ||
| 467 | } |
|
| 468 | } |
|
| 469 | ||
| 470 | public function mkdir($path) { |
|
| 471 | $path = $this->buildPath($path); |
|
| 472 | try { |
|
| 473 | $this->share->mkdir($path); |
|
| 474 | return true; |
|
| 475 | } catch (ConnectException $e) { |
|
| 476 | \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating folder']); |
|
| 477 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 478 | } catch (Exception $e) { |
|
| 479 | return false; |
|
| 480 | } |
|
| 481 | } |
|
| 482 | ||
| 483 | public function file_exists($path) { |
|
| 484 | try { |
|