| @@ 526-535 (lines=10) @@ | ||
| 523 | } |
|
| 524 | } |
|
| 525 | ||
| 526 | public function isReadable($path) { |
|
| 527 | try { |
|
| 528 | $info = $this->getFileInfo($path); |
|
| 529 | return !$info->isHidden(); |
|
| 530 | } catch (NotFoundException $e) { |
|
| 531 | return false; |
|
| 532 | } catch (ForbiddenException $e) { |
|
| 533 | return false; |
|
| 534 | } |
|
| 535 | } |
|
| 536 | ||
| 537 | public function isUpdatable($path) { |
|
| 538 | try { |
|
| @@ 537-548 (lines=12) @@ | ||
| 534 | } |
|
| 535 | } |
|
| 536 | ||
| 537 | public function isUpdatable($path) { |
|
| 538 | try { |
|
| 539 | $info = $this->getFileInfo($path); |
|
| 540 | // following windows behaviour for read-only folders: they can be written into |
|
| 541 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
| 542 | return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
| 543 | } catch (NotFoundException $e) { |
|
| 544 | return false; |
|
| 545 | } catch (ForbiddenException $e) { |
|
| 546 | return false; |
|
| 547 | } |
|
| 548 | } |
|
| 549 | ||
| 550 | public function isDeletable($path) { |
|
| 551 | try { |
|
| @@ 550-559 (lines=10) @@ | ||
| 547 | } |
|
| 548 | } |
|
| 549 | ||
| 550 | public function isDeletable($path) { |
|
| 551 | try { |
|
| 552 | $info = $this->getFileInfo($path); |
|
| 553 | return !$info->isHidden() && !$info->isReadOnly(); |
|
| 554 | } catch (NotFoundException $e) { |
|
| 555 | return false; |
|
| 556 | } catch (ForbiddenException $e) { |
|
| 557 | return false; |
|
| 558 | } |
|
| 559 | } |
|
| 560 | ||
| 561 | /** |
|
| 562 | * check if smbclient is installed |
|