| @@ 301-312 (lines=12) @@ | ||
| 298 | } |
|
| 299 | } |
|
| 300 | ||
| 301 | public function touch($path, $time = null) { |
|
| 302 | try { |
|
| 303 | if (!$this->file_exists($path)) { |
|
| 304 | $fh = $this->share->write($this->buildPath($path)); |
|
| 305 | fclose($fh); |
|
| 306 | return true; |
|
| 307 | } |
|
| 308 | return false; |
|
| 309 | } catch (ConnectException $e) { |
|
| 310 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 311 | } |
|
| 312 | } |
|
| 313 | ||
| 314 | public function opendir($path) { |
|
| 315 | try { |
|
| @@ 339-349 (lines=11) @@ | ||
| 336 | } |
|
| 337 | } |
|
| 338 | ||
| 339 | public function mkdir($path) { |
|
| 340 | $path = $this->buildPath($path); |
|
| 341 | try { |
|
| 342 | $this->share->mkdir($path); |
|
| 343 | return true; |
|
| 344 | } catch (ConnectException $e) { |
|
| 345 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
| 346 | } catch (Exception $e) { |
|
| 347 | return false; |
|
| 348 | } |
|
| 349 | } |
|
| 350 | ||
| 351 | public function file_exists($path) { |
|
| 352 | try { |
|