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