| @@ 476-485 (lines=10) @@ | ||
| 473 | } |
|
| 474 | } |
|
| 475 | ||
| 476 | public function isReadable($path) { |
|
| 477 | try { |
|
| 478 | $info = $this->getFileInfo($path); |
|
| 479 | return !$info->isHidden(); |
|
| 480 | } catch (NotFoundException $e) { |
|
| 481 | return false; |
|
| 482 | } catch (ForbiddenException $e) { |
|
| 483 | return false; |
|
| 484 | } |
|
| 485 | } |
|
| 486 | ||
| 487 | public function isUpdatable($path) { |
|
| 488 | try { |
|
| @@ 487-498 (lines=12) @@ | ||
| 484 | } |
|
| 485 | } |
|
| 486 | ||
| 487 | public function isUpdatable($path) { |
|
| 488 | try { |
|
| 489 | $info = $this->getFileInfo($path); |
|
| 490 | // following windows behaviour for read-only folders: they can be written into |
|
| 491 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
| 492 | return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
| 493 | } catch (NotFoundException $e) { |
|
| 494 | return false; |
|
| 495 | } catch (ForbiddenException $e) { |
|
| 496 | return false; |
|
| 497 | } |
|
| 498 | } |
|
| 499 | ||
| 500 | public function isDeletable($path) { |
|
| 501 | try { |
|
| @@ 500-509 (lines=10) @@ | ||
| 497 | } |
|
| 498 | } |
|
| 499 | ||
| 500 | public function isDeletable($path) { |
|
| 501 | try { |
|
| 502 | $info = $this->getFileInfo($path); |
|
| 503 | return !$info->isHidden() && !$info->isReadOnly(); |
|
| 504 | } catch (NotFoundException $e) { |
|
| 505 | return false; |
|
| 506 | } catch (ForbiddenException $e) { |
|
| 507 | return false; |
|
| 508 | } |
|
| 509 | } |
|
| 510 | ||
| 511 | /** |
|
| 512 | * check if smbclient is installed |
|