| @@ 505-514 (lines=10) @@ | ||
| 502 | } |
|
| 503 | } |
|
| 504 | ||
| 505 | public function isReadable($path) { |
|
| 506 | try { |
|
| 507 | $info = $this->getFileInfo($path); |
|
| 508 | return !$info->isHidden(); |
|
| 509 | } catch (NotFoundException $e) { |
|
| 510 | return false; |
|
| 511 | } catch (ForbiddenException $e) { |
|
| 512 | return false; |
|
| 513 | } |
|
| 514 | } |
|
| 515 | ||
| 516 | public function isUpdatable($path) { |
|
| 517 | try { |
|
| @@ 516-527 (lines=12) @@ | ||
| 513 | } |
|
| 514 | } |
|
| 515 | ||
| 516 | public function isUpdatable($path) { |
|
| 517 | try { |
|
| 518 | $info = $this->getFileInfo($path); |
|
| 519 | // following windows behaviour for read-only folders: they can be written into |
|
| 520 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
| 521 | return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
| 522 | } catch (NotFoundException $e) { |
|
| 523 | return false; |
|
| 524 | } catch (ForbiddenException $e) { |
|
| 525 | return false; |
|
| 526 | } |
|
| 527 | } |
|
| 528 | ||
| 529 | public function isDeletable($path) { |
|
| 530 | try { |
|
| @@ 529-538 (lines=10) @@ | ||
| 526 | } |
|
| 527 | } |
|
| 528 | ||
| 529 | public function isDeletable($path) { |
|
| 530 | try { |
|
| 531 | $info = $this->getFileInfo($path); |
|
| 532 | return !$info->isHidden() && !$info->isReadOnly(); |
|
| 533 | } catch (NotFoundException $e) { |
|
| 534 | return false; |
|
| 535 | } catch (ForbiddenException $e) { |
|
| 536 | return false; |
|
| 537 | } |
|
| 538 | } |
|
| 539 | ||
| 540 | /** |
|
| 541 | * check if smbclient is installed |
|