| @@ 421-432 (lines=12) @@ | ||
| 418 | } |
|
| 419 | } |
|
| 420 | ||
| 421 | public function touch($path, $time = null) { |
|
| 422 | try { |
|
| 423 | if (!$this->file_exists($path)) { |
|
| 424 | $fh = $this->share->write($this->buildPath($path)); |
|
| 425 | fclose($fh); |
|
| 426 | return true; |
|
| 427 | } |
|
| 428 | return false; |
|
| 429 | } catch (ConnectException $e) { |
|
| 430 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 431 | } |
|
| 432 | } |
|
| 433 | ||
| 434 | public function opendir($path) { |
|
| 435 | try { |
|
| @@ 459-469 (lines=11) @@ | ||
| 456 | } |
|
| 457 | } |
|
| 458 | ||
| 459 | public function mkdir($path) { |
|
| 460 | $path = $this->buildPath($path); |
|
| 461 | try { |
|
| 462 | $this->share->mkdir($path); |
|
| 463 | return true; |
|
| 464 | } catch (ConnectException $e) { |
|
| 465 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 466 | } catch (Exception $e) { |
|
| 467 | return false; |
|
| 468 | } |
|
| 469 | } |
|
| 470 | ||
| 471 | public function file_exists($path) { |
|
| 472 | try { |
|